home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Internet Tools 1995 April / Internet Tools.iso / mail / sendmail / UCB / sendmail.8.6.9.patch.Z / sendmail.8.6.9.patch
Encoding:
Text File  |  1994-04-18  |  127.4 KB  |  5,223 lines

  1. *** FAQ.OLD    Mon Feb 28 10:08:03 1994
  2. --- FAQ    Thu Apr 14 10:16:16 1994
  3. ***************
  4. *** 1,6 ****
  5.                   Sendmail Version 8
  6.               Frequently Asked Questions
  7. !                  Version 8.2 of 2/28/94
  8.   
  9.   
  10.   This FAQ is specific to Version 8 of sendmail.
  11. --- 1,6 ----
  12.                   Sendmail Version 8
  13.               Frequently Asked Questions
  14. !                  Version 8.3 of 4/14/94
  15.   
  16.   
  17.   This FAQ is specific to Version 8 of sendmail.
  18. ***************
  19. *** 207,212 ****
  20. --- 207,218 ----
  21.       description to be a new program that does this local delivery.
  22.       I understand that "procmail" works well, although I haven't
  23.       used it myself.
  24. +     You might be interested in reading the paper ``HLFSD: Delivering
  25. +     Email to your $HOME'' available in the Proceedings of the
  26. +     USENIX System Administration (LISA VII) Conference (November
  27. +     1993).  This is also available via public FTP from
  28. +     ftp.cs.columbia.edu:/pub/hlfsd/{README.hlfsd,hlfsd.ps}.
  29.   ----------------------------------------------------------------------
  30.     * Under V8, the "From " header gets mysteriously munged when I send
  31.       to an alias.
  32. *** Files.base.OLD    Fri Mar  4 17:29:30 1994
  33. --- Files.base    Wed Apr 13 10:26:01 1994
  34. ***************
  35. *** 1,5 ****
  36. ! #    @(#)Files.base    8.2 (Berkeley) 3/4/94
  37. ! CHANGES-R5-R8
  38.   FAQ
  39.   KNOWNBUGS
  40.   Makefile
  41. --- 1,4 ----
  42. ! #    @(#)Files.base    8.5 (Berkeley) 4/13/94
  43.   FAQ
  44.   KNOWNBUGS
  45.   Makefile
  46. ***************
  47. *** 21,26 ****
  48. --- 20,26 ----
  49.   src/Makefile.AUX
  50.   src/Makefile.BSD43
  51.   src/Makefile.BSDI
  52. + src/Makefile.CLIX
  53.   src/Makefile.ConvexOS
  54.   src/Makefile.DGUX
  55.   src/Makefile.Dell
  56. ***************
  57. *** 31,36 ****
  58. --- 31,37 ----
  59.   src/Makefile.IRIX
  60.   src/Makefile.Linux
  61.   src/Makefile.Mach386
  62. + src/Makefile.NCR3000
  63.   src/Makefile.NeXT
  64.   src/Makefile.NetBSD
  65.   src/Makefile.OSF1
  66. *** Files.xdoc.OLD    Sat Feb 26 09:18:19 1994
  67. --- Files.xdoc    Wed Apr 13 07:34:15 1994
  68. ***************
  69. *** 1,4 ****
  70. ! #    @(#)Files.xdoc    8.1 (Berkeley) 2/26/94
  71.   doc/intro/Makefile
  72.   doc/intro/intro.me
  73.   doc/intro/intro.ps
  74. --- 1,7 ----
  75. ! #    @(#)Files.xdoc    8.2 (Berkeley) 4/13/94
  76. ! doc/changes/Makefile
  77. ! doc/changes/changes.me
  78. ! doc/changes/changes.ps
  79.   doc/intro/Makefile
  80.   doc/intro/intro.me
  81.   doc/intro/intro.ps
  82. *** READ_ME.OLD    Wed Jan 26 17:39:28 1994
  83. --- READ_ME    Wed Apr 13 07:34:56 1994
  84. ***************
  85. *** 1,5 ****
  86.   /*-
  87. !  *    @(#)READ_ME    8.9 (Berkeley) 1/26/94
  88.    */
  89.   
  90.               SENDMAIL RELEASE 8
  91. --- 1,5 ----
  92.   /*-
  93. !  *    @(#)READ_ME    8.10 (Berkeley) 4/13/94
  94.    */
  95.   
  96.               SENDMAIL RELEASE 8
  97. ***************
  98. *** 135,140 ****
  99. --- 135,169 ----
  100.   Be sure you remove ndbm.h and ndbm.o from the db distribution.  These
  101.   will cause problems with sendmail because sendmail already understands
  102.   about NEWDB and NDBM coexisting.
  103. + +--------------------+
  104. + | Host Name Services |
  105. + +--------------------+
  106. + If you compile with NAMED_BIND (the default) sendmail will use
  107. + DNS (the Domain Name System) for most host name lookups.  If
  108. + you do not have DNS running at your site you may have to turn
  109. + this off to cause sendmail to use NIS and/or the /etc/hosts file.
  110. + In particular, on SunOS you have to choose to use DNS (which
  111. + you should do if you are attached to the Internet, otherwise
  112. + you lose MX records, which are required) or NIS -- there is no
  113. + way to try both.
  114. + If you are using NIS and /etc/hosts, it is critical that you
  115. + list the long (fully qualified) name first in the /etc/hosts file
  116. + used to build the NIS database.  For example, the line should read
  117. +     128.32.149.68   mastodon.CS.Berkeley.EDU mastodon
  118. + **** NOT ****
  119. +     128.32.149.68   mastodon mastodon.CS.Berkeley.EDU
  120. + If you use the wrong order, sendmail will conclude that your
  121. + canonical name is the short version and use that in messages.
  122. + The name "mastodon" doesn't mean much outside of Berkeley,
  123. + and so this creates incorrect and unreplyable messages.
  124.   
  125.   
  126.   +-------------+
  127. *** RELEASE_NOTES.OLD    Fri Apr  8 08:37:56 1994
  128. --- RELEASE_NOTES    Tue Apr 19 07:27:58 1994
  129. ***************
  130. *** 1,9 ****
  131.               SENDMAIL RELEASE NOTES
  132. !          @(#)RELEASE_NOTES    8.6.8.1 (Berkeley) 3/21/94
  133.   
  134.   This listing shows the version of the sendmail binary, the version
  135.   of the sendmail configuration files, the date of release, and a
  136.   summary of the changes in that release.
  137.   
  138.   8.6.8/8.6.6    94/03/21
  139.       SECURITY: it was possible to read any file as root using the
  140. --- 1,130 ----
  141.               SENDMAIL RELEASE NOTES
  142. !          @(#)RELEASE_NOTES    8.6.9.2 (Berkeley) 4/19/94
  143.   
  144.   This listing shows the version of the sendmail binary, the version
  145.   of the sendmail configuration files, the date of release, and a
  146.   summary of the changes in that release.
  147. + 8.6.9/8.6.9    94/04/19
  148. +     Do all mail delivery completely disconnected from any terminal.
  149. +         This provides consistency with daemon delivery and
  150. +         may have some security implications.
  151. +     Make sure that malloc doesn't get called with zero size,
  152. +         since that fails on some systems.  Reported by Ed
  153. +         Hill of the University of Iowa.
  154. +     Fix multi-line values for $e (SMTP greeting message).  Reported
  155. +         by Mike O'Connor of Ford Motor Company.
  156. +     Avoid syserr if no NIS domain name is defined, but the map it
  157. +         is trying to open is optional.  From Win Bent of USC.
  158. +     Changes for picky compilers from Ed Gould of Digital Equipment.
  159. +     Hesiod support for UDB from Todd Miller of the University of
  160. +         Colorado.  Use "hesiod" as the service name in the U
  161. +         option.
  162. +     Fix a problem that failed to set the "authentic" host name (that
  163. +         is, the one derived from the socket info) if you called
  164. +         sendmail -bs from inetd.  Based on code contributed by
  165. +         Todd Miller (this problem was also reported by Guy Helmer
  166. +         of Dakota State University).  This also fixes a related
  167. +         problem reported by Liudvikas Bukys of Rochester University.
  168. +     Parameterize "nroff -h" in all the Makefiles so people with
  169. +         variant versions can use them easily.  Suggested by
  170. +         Peter Collinson of Hillside Systems.
  171. +     SMTP "MAIL" commands with multiple ESMTP parameters required two
  172. +         spaces between parameters instead of one.  Reported by
  173. +         Valdis Kletnieks of Virginia Tech.
  174. +     Reduce the number of system calls during message collection by
  175. +         using global timeouts around the collect() loop.  This
  176. +         code was contributed by Eric Wassenaar.
  177. +     If the initial hostname name gathering results in a name
  178. +         without a dot (usually caused by NIS misconfiguration)
  179. +         and BIND is compiled in, directly access DNS to get
  180. +         the canonical name.  This should make life easier for
  181. +         Solaris systems.  If it still can't be resolved, and
  182. +         if the name server is listed as "required", try again
  183. +         in 30 seconds.  If that also fails, exit immediately to
  184. +         avoid bogus "config error: mail loops back to myself"
  185. +         messages.
  186. +     Improve the "MAIL DELETED BECAUSE OF LACK OF DISK SPACE" error
  187. +         message to explain how much space was available and
  188. +         sound a bit less threatening.  Suggested by Stan Janet
  189. +         of the National Institute of Standards and Technology.
  190. +     If mail is delivered to an alias that has an owner, deliver any
  191. +         requested return-receipt immediately, and strip the
  192. +         Return-Receipt-To: header from the subsequent message.
  193. +         This prevents a certain class of denial of service
  194. +         attack, arguably gives more reasonable semantics, and
  195. +         moves things more towards what will probably become a
  196. +         network standard.  Suggested by Christopher Davis of
  197. +         Kapor Enterprises.
  198. +     Add a "noreceipts" privacy flag to turn off all return receipts
  199. +         without recompiling.
  200. +     Avoid printing ESMTP parameters as part of the error message
  201. +         if there are errors during parsing.  This change is
  202. +         purely cosmetic.
  203. +     Avoid sending out error messages during the collect phase of
  204. +         SMTP; there is an MVS mailer from UCLA that gets
  205. +         confused by this.  Of course, I think it's their bug....
  206. +     Check for the $j macro getting undefined, losing a dot, or getting
  207. +         lost from $=w in the daemon before accepting a connection;
  208. +         if it is, it dumps state, prints a LOG_ALERT message,
  209. +         and drops core for debugging.  This is an attempt to
  210. +         track down a bug that I thought was long since gone.
  211. +         If you see this, please forward the log fragment to
  212. +         sendmail@CS.Berkeley.EDU.
  213. +     Change OLD_NEWDB from a #ifdef to a #if so it can be turned off
  214. +         with -DOLD_NEWDB=0 on the command line.  From Christophe
  215. +         Wolfhugel.
  216. +     Instead of trying to truncate the listen queue for the server
  217. +         SMTP port when the load average is too high, just close
  218. +         the port completely and reopen it later as needed.
  219. +         This ensures that the other end gets a quick "connection
  220. +         refused" response, and that the connection can be
  221. +         recovered later.  In particular, some socket emulations
  222. +         seem to get confused if you tweak the listen queue
  223. +         size around and can never start listening to connections
  224. +         again.  The down side is that someone could start up
  225. +         another daemon process in the interim, so you could
  226. +         have multiple daemons all not listening to connections;
  227. +         this could in turn cause the sendmail.pid file to be
  228. +         incorrect.  A better approach might be to accept the
  229. +         connection and give a 421 code, but that could break
  230. +         other mailers in mysterious ways and have paging behaviour
  231. +         implications.
  232. +     Fix a glitch in TCP-level debugging that caused flag 16.101 to
  233. +         set debugging on the wrong socket.  From Eric Wassenaar.
  234. +     When creating a df* temporary file, be sure you truncate any
  235. +         existing data in the file -- otherwise system crashes
  236. +         and the like could result in extra data being sent.
  237. +     DOC: Replace the CHANGES-R5-R8 readme file with a paper in the
  238. +         doc directory.  This includes some additional
  239. +         information.
  240. +     CONFIG: change UUCP rules to never add $U! or $k! on the front
  241. +         of recipient envelope addresses.  This should have been
  242. +         handled by the $&h trick, but broke if people were
  243. +         mixing domainized and UUCP addresses.  They should
  244. +         probably have converted all the way over to uucp-uudom
  245. +         instead of uucp-{new,old}, but the failure mode was to
  246. +         loop the mail, which was bad news.
  247. +     Portability fixes:
  248. +         Newer BSDI systems (several people).
  249. +         Older BSDI systems from Christophe Wolfhugel.
  250. +         Intergraph CLIX, from Paul Southworth of CICNet.
  251. +         UnixWare, from Evan Champion.
  252. +         NetBSD from Adam Glass.
  253. +         Solaris from Quentin Campbell of the University of
  254. +             Newcastle upon Tyne.
  255. +         IRIX from Dean Cookson and Bill Driscoll of Mitre
  256. +             Corporation.
  257. +         NCR 3000 from Kevin Darcy of Chrysler Corporation.
  258. +         SunOS (it has setsid() and setvbuf() calls) from
  259. +             Jonathan Kamens of OpenVision Technologies.
  260. +         HP-UX from Tor Lillqvist.
  261. +     New Files:
  262. +         src/Makefile.CLIX
  263. +         src/Makefile.NCR3000
  264. +         doc/changes/Makefile
  265. +         doc/changes/changes.me
  266. +         doc/changes/changes.ps
  267.   
  268.   8.6.8/8.6.6    94/03/21
  269.       SECURITY: it was possible to read any file as root using the
  270. *** cf/README.OLD    Sat Mar 12 08:49:57 1994
  271. --- cf/README    Thu Apr 14 15:31:15 1994
  272. ***************
  273. *** 4,10 ****
  274.   
  275.           Eric Allman <eric@CS.Berkeley.EDU>
  276.   
  277. !         @(#)README    8.27 (Berkeley) 3/12/94
  278.   
  279.   
  280.   This document describes the sendmail configuration files being used
  281. --- 4,10 ----
  282.   
  283.           Eric Allman <eric@CS.Berkeley.EDU>
  284.   
  285. !         @(#)README    8.28 (Berkeley) 4/14/94
  286.   
  287.   
  288.   This document describes the sendmail configuration files being used
  289. ***************
  290. *** 140,146 ****
  291.   
  292.   ALIAS_FILE        [/etc/aliases] The location of the text version
  293.               of the alias file(s).  It can be a comma-separated
  294. !             list of names.
  295.   HELP_FILE        [/usr/lib/sendmail.hf] The name of the file
  296.               containing information printed in response to
  297.               the SMTP HELP command.
  298. --- 140,150 ----
  299.   
  300.   ALIAS_FILE        [/etc/aliases] The location of the text version
  301.               of the alias file(s).  It can be a comma-separated
  302. !             list of names (but be sure you quote values with
  303. !             comments in them -- for example, use
  304. !                 define(`ALIAS_FILE', `a,b')
  305. !             to get "a" and "b" both listed as alias files;
  306. !             otherwise the define() primitive only sees "a").
  307.   HELP_FILE        [/usr/lib/sendmail.hf] The name of the file
  308.               containing information printed in response to
  309.               the SMTP HELP command.
  310. *** cf/m4/version.m4.OLD    Thu Apr 14 10:24:40 1994
  311. --- cf/m4/version.m4    Mon Apr 18 22:17:40 1994
  312. ***************
  313. *** 32,39 ****
  314.   # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  315.   # SUCH DAMAGE.
  316.   #
  317. ! VERSIONID(`@(#)version.m4    8.6.6.1 (Berkeley) 3/13/94')
  318.   #
  319.   divert(0)
  320.   # Configuration version number
  321. ! DZ8.6.6
  322. --- 32,39 ----
  323.   # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  324.   # SUCH DAMAGE.
  325.   #
  326. ! VERSIONID(`@(#)version.m4    8.6.9.1 (Berkeley) 4/18/94')
  327.   #
  328.   divert(0)
  329.   # Configuration version number
  330. ! DZ8.6.9
  331. *** cf/mailer/uucp.m4.OLD    Wed Feb 16 07:58:07 1994
  332. --- cf/mailer/uucp.m4    Thu Apr 14 16:03:20 1994
  333. ***************
  334. *** 42,48 ****
  335.   ###   UUCP Mailer specification   ###
  336.   #####################################
  337.   
  338. ! VERSIONID(`@(#)uucp.m4    8.15 (Berkeley) 2/16/94')
  339.   
  340.   #
  341.   #  There are innumerable variations on the UUCP mailer.  It really
  342. --- 42,48 ----
  343.   ###   UUCP Mailer specification   ###
  344.   #####################################
  345.   
  346. ! VERSIONID(`@(#)uucp.m4    8.16 (Berkeley) 4/14/94')
  347.   
  348.   #
  349.   #  There are innumerable variations on the UUCP mailer.  It really
  350. ***************
  351. *** 50,64 ****
  352.   #
  353.   
  354.   # old UUCP mailer (two names)
  355. ! Muucp,        P=UUCP_MAILER_PATH, F=CONCAT(DFMhuU, UUCP_MAILER_FLAGS), S=12, R=22, M=UUCP_MAX_SIZE,
  356.           A=UUCP_MAILER_ARGS
  357. ! Muucp-old,    P=UUCP_MAILER_PATH, F=CONCAT(DFMhuU, UUCP_MAILER_FLAGS), S=12, R=22, M=UUCP_MAX_SIZE,
  358.           A=UUCP_MAILER_ARGS
  359.   
  360.   # smart UUCP mailer (handles multiple addresses) (two names)
  361. ! Msuucp,        P=UUCP_MAILER_PATH, F=CONCAT(mDFMhuU, UUCP_MAILER_FLAGS), S=12, R=22, M=UUCP_MAX_SIZE,
  362.           A=UUCP_MAILER_ARGS
  363. ! Muucp-new,    P=UUCP_MAILER_PATH, F=CONCAT(mDFMhuU, UUCP_MAILER_FLAGS), S=12, R=22, M=UUCP_MAX_SIZE,
  364.           A=UUCP_MAILER_ARGS
  365.   
  366.   ifdef(`_MAILER_smtp_',
  367. --- 50,64 ----
  368.   #
  369.   
  370.   # old UUCP mailer (two names)
  371. ! Muucp,        P=UUCP_MAILER_PATH, F=CONCAT(DFMhuU, UUCP_MAILER_FLAGS), S=12, R=22/42, M=UUCP_MAX_SIZE,
  372.           A=UUCP_MAILER_ARGS
  373. ! Muucp-old,    P=UUCP_MAILER_PATH, F=CONCAT(DFMhuU, UUCP_MAILER_FLAGS), S=12, R=22/42, M=UUCP_MAX_SIZE,
  374.           A=UUCP_MAILER_ARGS
  375.   
  376.   # smart UUCP mailer (handles multiple addresses) (two names)
  377. ! Msuucp,        P=UUCP_MAILER_PATH, F=CONCAT(mDFMhuU, UUCP_MAILER_FLAGS), S=12, R=22/42, M=UUCP_MAX_SIZE,
  378.           A=UUCP_MAILER_ARGS
  379. ! Muucp-new,    P=UUCP_MAILER_PATH, F=CONCAT(mDFMhuU, UUCP_MAILER_FLAGS), S=12, R=22/42, M=UUCP_MAX_SIZE,
  380.           A=UUCP_MAILER_ARGS
  381.   
  382.   ifdef(`_MAILER_smtp_',
  383. ***************
  384. *** 94,102 ****
  385.   R! $+                $: $k ! $1        in case $U undefined
  386.   
  387.   #
  388. ! #  envelope and header recipient rewriting
  389.   #
  390.   S22
  391.   
  392.   # don't touch list:; syntax
  393.   R$* :; <@>            $@ $1 :;
  394. --- 94,117 ----
  395.   R! $+                $: $k ! $1        in case $U undefined
  396.   
  397.   #
  398. ! #  envelope recipient rewriting
  399.   #
  400.   S22
  401. + # don't touch list:; syntax
  402. + R$* :; <@>            $@ $1 :;
  403. + R$* < @ $* . >            $1 < @ $2 >        strip trailing dots
  404. + R$* < @ $j >            $1            strip local name
  405. + R<@ $- . UUCP > : $+        $1 ! $2            convert to UUCP format
  406. + R<@ $+ > : $+            $1 ! $2            convert to UUCP format
  407. + R$* < @ $- . UUCP >        $2 ! $1            convert to UUCP format
  408. + R$* < @ $+ >            $2 ! $1            convert to UUCP format
  409. + #
  410. + #  header recipient rewriting
  411. + #
  412. + S42
  413.   
  414.   # don't touch list:; syntax
  415.   R$* :; <@>            $@ $1 :;
  416. *** contrib/xla/xla.c.OLD    Sat May 22 11:01:44 1993
  417. --- contrib/xla/xla.c    Sun Apr 17 07:36:06 1994
  418. ***************
  419. *** 1,5 ****
  420.   /*
  421. !  * (C) Copyright 1993, Herve Schauer Consultants
  422.    *
  423.    * This module written by Christophe.Wolfhugel@hsc-sec.fr
  424.    * is to be used under the same conditions and terms (and absence
  425. --- 1,5 ----
  426.   /*
  427. !  * (C) Copyright 1993-94, Herve Schauer Consultants
  428.    *
  429.    * This module written by Christophe.Wolfhugel@hsc-sec.fr
  430.    * is to be used under the same conditions and terms (and absence
  431. ***************
  432. *** 7,12 ****
  433. --- 7,16 ----
  434.    *
  435.    * ABSOLUTELY NO WARRANTY. USE AT YOUR OWN RISKS.
  436.    *
  437. +  * Version: 940417, applied a patch from Paul Graham <pjg@acsu.buffalo.edu>
  438. +  *                  (lockfile syntax in xla.c did not reflect anymore the
  439. +  *                  new one used by sendmail, now fine).
  440. +  *
  441.    */
  442.   
  443.   
  444. ***************
  445. *** 100,106 ****
  446.       XlaFname = NULL;
  447.       XlaNext  = 0;
  448.       XlaPid   = 0;
  449. !     memset(&XlaRules[0], 0, sizeof(XLARULE) * MAXLARULES);
  450.   }
  451.   
  452.   
  453. --- 104,110 ----
  454.       XlaFname = NULL;
  455.       XlaNext  = 0;
  456.       XlaPid   = 0;
  457. !     memset((char *) &XlaRules[0], 0, sizeof(XLARULE) * MAXLARULES);
  458.   }
  459.   
  460.   
  461. ***************
  462. *** 198,204 ****
  463.           syserr("xla_create_file: open failed");
  464.           return;
  465.       }
  466. !     if (!lockfile(fd, XlaFname, LOCK_EX)) {
  467.           close(fd);
  468.           XlaFname = NULL;
  469.           syserr("xla_create_file: can't set lock");
  470. --- 202,208 ----
  471.           syserr("xla_create_file: open failed");
  472.           return;
  473.       }
  474. !     if (!lockfile(fd, XlaFname, NULL, LOCK_EX)) {
  475.           close(fd);
  476.           XlaFname = NULL;
  477.           syserr("xla_create_file: can't set lock");
  478. ***************
  479. *** 250,256 ****
  480.           syserr("xla_smtp_ok: open failed");
  481.           return(TRUE);
  482.       }
  483. !     if (!lockfile(fd, XlaFname, LOCK_EX)) {
  484.           close(fd);
  485.           XlaFname = NULL;
  486.           syserr("xla_smtp_ok: can't set lock");
  487. --- 254,260 ----
  488.           syserr("xla_smtp_ok: open failed");
  489.           return(TRUE);
  490.       }
  491. !     if (!lockfile(fd, XlaFname, NULL, LOCK_EX)) {
  492.           close(fd);
  493.           XlaFname = NULL;
  494.           syserr("xla_smtp_ok: can't set lock");
  495. ***************
  496. *** 304,310 ****
  497.           return(TRUE);
  498.       }
  499.       XlaPid = getpid();
  500. !     if (!lockfile(fd, XlaFname, LOCK_EX)) {
  501.           close(fd);
  502.           XlaFname = NULL;
  503.           syserr("xla_host_ok: can't set lock");
  504. --- 308,314 ----
  505.           return(TRUE);
  506.       }
  507.       XlaPid = getpid();
  508. !     if (!lockfile(fd, XlaFname, NULL, LOCK_EX)) {
  509.           close(fd);
  510.           XlaFname = NULL;
  511.           syserr("xla_host_ok: can't set lock");
  512. ***************
  513. *** 372,378 ****
  514.           syserr("xla_noqueue_ok: open failed");
  515.           return(TRUE);
  516.       }
  517. !     if (!lockfile(fd, XlaFname, LOCK_EX)) {
  518.           close(fd);
  519.           XlaFname = NULL;
  520.           syserr("xla_noqueue_ok: can't set lock");
  521. --- 376,382 ----
  522.           syserr("xla_noqueue_ok: open failed");
  523.           return(TRUE);
  524.       }
  525. !     if (!lockfile(fd, XlaFname, NULL, LOCK_EX)) {
  526.           close(fd);
  527.           XlaFname = NULL;
  528.           syserr("xla_noqueue_ok: can't set lock");
  529. ***************
  530. *** 441,447 ****
  531.           syserr("xla_host_end: open failed");
  532.           return;
  533.       }
  534. !     if (!lockfile(fd, XlaFname, LOCK_EX)) {
  535.                   close(fd);
  536.                   XlaFname = NULL;
  537.           syserr("xla_host_end: can't set lock");
  538. --- 445,451 ----
  539.           syserr("xla_host_end: open failed");
  540.           return;
  541.       }
  542. !     if (!lockfile(fd, XlaFname, NULL, LOCK_EX)) {
  543.                   close(fd);
  544.                   XlaFname = NULL;
  545.           syserr("xla_host_end: can't set lock");
  546. ***************
  547. *** 502,508 ****
  548.           syserr("xla_all_end: open failed");
  549.                   return;
  550.           }
  551. !         if (!lockfile(fd, XlaFname, LOCK_EX)) {
  552.                   close(fd);
  553.                   XlaFname = NULL;
  554.                   syserr("xla_all_end: can't set lock");
  555. --- 506,512 ----
  556.           syserr("xla_all_end: open failed");
  557.                   return;
  558.           }
  559. !         if (!lockfile(fd, XlaFname, NULL, LOCK_EX)) {
  560.                   close(fd);
  561.                   XlaFname = NULL;
  562.                   syserr("xla_all_end: can't set lock");
  563. *** doc/op/op.me.OLD    Mon Mar 21 23:33:11 1994
  564. --- doc/op/op.me    Thu Apr 14 10:40:52 1994
  565. ***************
  566. *** 30,36 ****
  567.   .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  568.   .\" SUCH DAMAGE.
  569.   .\"
  570. ! .\"    @(#)op.me    8.34 (Berkeley) 3/3/94
  571.   .\"
  572.   .\" eqn op.me | pic | troff -me
  573.   .eh 'SMM:08-%''Sendmail Installation and Operation Guide'
  574. --- 30,36 ----
  575.   .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  576.   .\" SUCH DAMAGE.
  577.   .\"
  578. ! .\"    @(#)op.me    8.36 (Berkeley) 4/14/94
  579.   .\"
  580.   .\" eqn op.me | pic | troff -me
  581.   .eh 'SMM:08-%''Sendmail Installation and Operation Guide'
  582. ***************
  583. *** 69,75 ****
  584.   Mammoth Project
  585.   eric@CS.Berkeley.EDU
  586.   .sp
  587. ! Version 8.34
  588.   .sp
  589.   For Sendmail Version 8.6
  590.   .)l
  591. --- 69,75 ----
  592.   Mammoth Project
  593.   eric@CS.Berkeley.EDU
  594.   .sp
  595. ! Version 8.36
  596.   .sp
  597.   For Sendmail Version 8.6
  598.   .)l
  599. ***************
  600. *** 1206,1211 ****
  601. --- 1206,1214 ----
  602.   it just means that the message has been delivered
  603.   to the recipient's mailbox.
  604.   .)f
  605. + This header can be disabled with the
  606. + .q noreceipts
  607. + privacy flag.
  608.   .sh 3 "Errors-To:"
  609.   .pp
  610.   If errors occur anywhere during processing,
  611. ***************
  612. *** 3856,3861 ****
  613. --- 3859,3865 ----
  614.   novrfy    Disallow VRFY entirely
  615.   restrictmailq    Restrict mailq command
  616.   restrictqrun    Restrict \-q command line flag
  617. + noreceipts    Ignore Return-Receipt-To: header
  618.   goaway    Disallow essentially all SMTP status queries
  619.   authwarnings    Put X-Authentication-Warning: headers in messages
  620.   .)b
  621. ***************
  622. *** 4103,4109 ****
  623.   .i sendmail
  624.   to relinquish its setuid permissions.
  625.   The options that will not cause this are
  626. ! b, d, e, E, i, L, m, o, p, r, s, v, C, and 7.
  627.   Also, M (define macro) when defining the r or s macros
  628.   is also considered
  629.   .q safe .
  630. --- 4107,4113 ----
  631.   .i sendmail
  632.   to relinquish its setuid permissions.
  633.   The options that will not cause this are
  634. ! b, d, e, i, L, m, o, p, r, s, v, C, and 7.
  635.   Also, M (define macro) when defining the r or s macros
  636.   is also considered
  637.   .q safe .
  638. ***************
  639. *** 6887,6893 ****
  640.   .\"Eric Allman
  641.   .\"Britton-Lee, Inc.
  642.   .\".sp
  643. ! .\"Version 8.34
  644.   .\".ce 0
  645.   .bp 2
  646.   .rs
  647. --- 6891,6897 ----
  648.   .\"Eric Allman
  649.   .\"Britton-Lee, Inc.
  650.   .\".sp
  651. ! .\"Version 8.36
  652.   .\".ce 0
  653.   .bp 2
  654.   .rs
  655. *** src/Makefile.AIX.OLD    Sat Mar  5 11:50:24 1994
  656. --- src/Makefile.AIX    Tue Apr 12 07:41:11 1994
  657. ***************
  658. *** 7,13 ****
  659.   #
  660.   #  This has been tested on AIX 3.1.5 and 3.2.3e.
  661.   #
  662. ! #    @(#)Makefile.AIX    8.2 (Berkeley) 3/5/94
  663.   #
  664.   
  665.   # use O=-O (usual) or O=-g (debugging)
  666. --- 7,13 ----
  667.   #
  668.   #  This has been tested on AIX 3.1.5 and 3.2.3e.
  669.   #
  670. ! #    @(#)Makefile.AIX    8.3 (Berkeley) 4/11/94
  671.   #
  672.   
  673.   # use O=-O (usual) or O=-g (debugging)
  674. ***************
  675. *** 79,95 ****
  676.   sendmail: ${BEFORE} ${OBJS}
  677.       ${CC} -o sendmail ${OBJS} ${LIBDIRS} ${LIBS}
  678.   
  679.   aliases.0: aliases.5
  680. !     nroff -h -mandoc aliases.5 > aliases.0
  681.   
  682.   mailq.0: mailq.1
  683. !     nroff -h -mandoc mailq.1 > mailq.0
  684.   
  685.   newaliases.0: newaliases.1
  686. !     nroff -h -mandoc newaliases.1 > newaliases.0
  687.   
  688.   sendmail.0: sendmail.8
  689. !     nroff -h -mandoc sendmail.8 > sendmail.0
  690.   
  691.   install: install-sendmail install-docs
  692.   
  693. --- 79,97 ----
  694.   sendmail: ${BEFORE} ${OBJS}
  695.       ${CC} -o sendmail ${OBJS} ${LIBDIRS} ${LIBS}
  696.   
  697. + NROFF=    nroff -h
  698.   aliases.0: aliases.5
  699. !     ${NROFF} -mandoc aliases.5 > aliases.0
  700.   
  701.   mailq.0: mailq.1
  702. !     ${NROFF} -mandoc mailq.1 > mailq.0
  703.   
  704.   newaliases.0: newaliases.1
  705. !     ${NROFF} -mandoc newaliases.1 > newaliases.0
  706.   
  707.   sendmail.0: sendmail.8
  708. !     ${NROFF} -mandoc sendmail.8 > sendmail.0
  709.   
  710.   install: install-sendmail install-docs
  711.   
  712. *** src/Makefile.AUX.OLD    Sat Mar  5 11:50:24 1994
  713. --- src/Makefile.AUX    Tue Apr 12 07:41:11 1994
  714. ***************
  715. *** 5,11 ****
  716.   #  old make program (I recommend that you get and port the new make if you
  717.   #  are going to be doing any signficant work on sendmail).
  718.   #
  719. ! #    @(#)Makefile.AUX    8.2 (Berkeley) 3/5/94
  720.   #
  721.   
  722.   # use O=-O (usual) or O=-g (debugging)
  723. --- 5,11 ----
  724.   #  old make program (I recommend that you get and port the new make if you
  725.   #  are going to be doing any signficant work on sendmail).
  726.   #
  727. ! #    @(#)Makefile.AUX    8.3 (Berkeley) 4/11/94
  728.   #
  729.   
  730.   # use O=-O (usual) or O=-g (debugging)
  731. ***************
  732. *** 71,87 ****
  733.   sendmail: ${BEFORE} ${OBJS}
  734.       ${CC} -o sendmail ${LDOPTS} ${OBJS} ${LIBDIRS} ${LIBS}
  735.   
  736.   aliases.0: aliases.5
  737. !     nroff -h -mandoc aliases.5 > aliases.0
  738.   
  739.   mailq.0: mailq.1
  740. !     nroff -h -mandoc mailq.1 > mailq.0
  741.   
  742.   newaliases.0: newaliases.1
  743. !     nroff -h -mandoc newaliases.1 > newaliases.0
  744.   
  745.   sendmail.0: sendmail.8
  746. !     nroff -h -mandoc sendmail.8 > sendmail.0
  747.   
  748.   install: install-sendmail install-docs
  749.   
  750. --- 71,89 ----
  751.   sendmail: ${BEFORE} ${OBJS}
  752.       ${CC} -o sendmail ${LDOPTS} ${OBJS} ${LIBDIRS} ${LIBS}
  753.   
  754. + NROFF=    nroff -h
  755.   aliases.0: aliases.5
  756. !     ${NROFF} -mandoc aliases.5 > aliases.0
  757.   
  758.   mailq.0: mailq.1
  759. !     ${NROFF} -mandoc mailq.1 > mailq.0
  760.   
  761.   newaliases.0: newaliases.1
  762. !     ${NROFF} -mandoc newaliases.1 > newaliases.0
  763.   
  764.   sendmail.0: sendmail.8
  765. !     ${NROFF} -mandoc sendmail.8 > sendmail.0
  766.   
  767.   install: install-sendmail install-docs
  768.   
  769. *** src/Makefile.BSD43.OLD    Sat Mar  5 11:50:24 1994
  770. --- src/Makefile.BSD43    Tue Apr 12 07:41:11 1994
  771. ***************
  772. *** 11,17 ****
  773.   #    It should also work on UMIPS-BSD from MIPS, if you still have
  774.   #    any lying around.
  775.   #
  776. ! #    @(#)Makefile.BSD43    8.2 (Berkeley) 3/5/94
  777.   #
  778.   
  779.   # use O=-O (usual) or O=-g (debugging)
  780. --- 11,17 ----
  781.   #    It should also work on UMIPS-BSD from MIPS, if you still have
  782.   #    any lying around.
  783.   #
  784. ! #    @(#)Makefile.BSD43    8.3 (Berkeley) 4/11/94
  785.   #
  786.   
  787.   # use O=-O (usual) or O=-g (debugging)
  788. ***************
  789. *** 89,105 ****
  790.       echo "#include <sys/dir.h>" > dirent.h
  791.       echo "#define dirent    direct" >> dirent.h
  792.   
  793.   aliases.0: aliases.5
  794. !     nroff -h -mandoc aliases.5 > aliases.0
  795.   
  796.   mailq.0: mailq.1
  797. !     nroff -h -mandoc mailq.1 > mailq.0
  798.   
  799.   newaliases.0: newaliases.1
  800. !     nroff -h -mandoc newaliases.1 > newaliases.0
  801.   
  802.   sendmail.0: sendmail.8
  803. !     nroff -h -mandoc sendmail.8 > sendmail.0
  804.   
  805.   install: install-sendmail install-docs
  806.   
  807. --- 89,107 ----
  808.       echo "#include <sys/dir.h>" > dirent.h
  809.       echo "#define dirent    direct" >> dirent.h
  810.   
  811. + NROFF=    nroff -h
  812.   aliases.0: aliases.5
  813. !     ${NROFF} -mandoc aliases.5 > aliases.0
  814.   
  815.   mailq.0: mailq.1
  816. !     ${NROFF} -mandoc mailq.1 > mailq.0
  817.   
  818.   newaliases.0: newaliases.1
  819. !     ${NROFF} -mandoc newaliases.1 > newaliases.0
  820.   
  821.   sendmail.0: sendmail.8
  822. !     ${NROFF} -mandoc sendmail.8 > sendmail.0
  823.   
  824.   install: install-sendmail install-docs
  825.   
  826. *** src/Makefile.CLIX.OLD    Wed Apr 13 10:26:59 1994
  827. --- src/Makefile.CLIX    Tue Apr 12 08:43:02 1994
  828. ***************
  829. *** 0 ****
  830. --- 1,115 ----
  831. + #
  832. + #  This makefile is for clipper-based Intergraph systems running CLIX.
  833. + #  It and the defines supporting it in the source tree should be considered
  834. + #  alpha-quality and used at own risk.
  835. + #
  836. + #  Porting done for CICNet, Inc., on behalf the Michigan State Department
  837. + #  of Natural Resources.
  838. + #
  839. + #  --Paul Southworth <pauls@cic.net>
  840. + #
  841. + #    @(#)Makefile.CLIX    8.1 (Berkeley) 4/12/94
  842. + #
  843. + # make sure the shell constructs below use the right shell
  844. + SHELL=    /bin/sh
  845. + # use O=-O (usual) or O=-g (debugging)
  846. + O=    -O
  847. + CC=    gcc
  848. + # define the database mechanism used for alias lookups:
  849. + #    -DNDBM -- use new DBM
  850. + #    -DNEWDB -- use new Berkeley DB
  851. + #    -DNIS -- include NIS support
  852. + # The really old (V7) DBM library is no longer supported.
  853. + # See READ_ME for a description of how these flags interact.
  854. + #
  855. + DBMDEF=    -DNDBM
  856. + # environment definitions (e.g., -D_AIX3)
  857. + ENVDEF=    -DCLIX
  858. + # see also conf.h for additional compilation flags
  859. + # include directories
  860. + INCDIRS= -I/usr/include
  861. + # library directories
  862. + LIBDIRS=
  863. + # libraries required on your system
  864. + LIBS=    -lnsl -lbsd
  865. + # location of sendmail binary (usually /usr/sbin or /usr/lib)
  866. + BINDIR=    ${DESTDIR}/usr/lib
  867. + # location of sendmail.st file (usually /var/log or /usr/lib)
  868. + STDIR=    ${DESTDIR}/usr/lib
  869. + # location of sendmail.hf file (usually /usr/share/misc or /usr/lib)
  870. + HFDIR=    ${DESTDIR}/usr/lib
  871. + # additional .o files needed
  872. + OBJADD= getusershell.o
  873. + ###################  end of user configuration flags  ######################
  874. + CFLAGS=    -I. $O ${INCDIRS} ${DBMDEF} ${ENVDEF}
  875. + OBJS=    alias.o arpadate.o clock.o collect.o conf.o convtime.o daemon.o \
  876. +     deliver.o domain.o envelope.o err.o headers.o macro.o main.o \
  877. +     map.o mci.o parseaddr.o queue.o readcf.o recipient.o \
  878. +     savemail.o srvrsmtp.o stab.o stats.o sysexits.o \
  879. +     trace.o udb.o usersmtp.o util.o version.o ${OBJADD}
  880. + LINKS=    ${DESTDIR}/usr/bin/newaliases ${DESTDIR}/usr/bin/mailq
  881. + BINOWN=    root
  882. + BINGRP=    mail
  883. + BINMODE=6555
  884. + INSTALL=cp
  885. + ALL=    sendmail # aliases.0 mailq.0 newaliases.0 sendmail.0
  886. + all: ${ALL}
  887. + sendmail: ${BEFORE} ${OBJS}
  888. +     ${CC} -o sendmail ${OBJS} ${LIBDIRS} ${LIBS}
  889. + NROFF=    nroff -h
  890. + aliases.0: aliases.5
  891. +     ${NROFF} -mandoc aliases.5 > aliases.0
  892. + mailq.0: mailq.1
  893. +     ${NROFF} -mandoc mailq.1 > mailq.0
  894. + newaliases.0: newaliases.1
  895. +     ${NROFF} -mandoc newaliases.1 > newaliases.0
  896. + sendmail.0: sendmail.8
  897. +     ${NROFF} -mandoc sendmail.8 > sendmail.0
  898. + install: install-sendmail #install-docs
  899. + install-sendmail: sendmail
  900. +     #${INSTALL} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} sendmail ${BINDIR}
  901. +     ${INSTALL} sendmail ${BINDIR}
  902. +     chmod ${BINMODE} ${BINDIR}/sendmail
  903. +     for i in ${LINKS}; do rm -f $$i; ln -s ${BINDIR}/sendmail $$i; done
  904. +     #${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \
  905. +     #    ${STDIR}/sendmail.st
  906. +     ${INSTALL} /dev/null ${STDIR}/sendmail.st
  907. +     #${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 444 sendmail.hf ${HFDIR}
  908. +     ${INSTALL} sendmail.hf ${HFDIR}
  909. + # doesn't actually install them -- you may want to install pre-nroff versions
  910. + install-docs: aliases.0 mailq.0 newaliases.0 sendmail.0
  911. + clean:
  912. +     rm -f ${OBJS} sendmail #aliases.0 mailq.0 newaliases.0 sendmail.0
  913. + # dependencies
  914. + #   gross overkill, and yet still not quite enough....
  915. + ${OBJS}: sendmail.h conf.h
  916. *** src/Makefile.ConvexOS.OLD    Sat Mar  5 11:50:24 1994
  917. --- src/Makefile.ConvexOS    Tue Apr 12 07:41:11 1994
  918. ***************
  919. *** 7,13 ****
  920.   #
  921.   #  This has been tested on CxOS 11.0 beta 1 and 10.x.
  922.   #
  923. ! #    @(#)Makefile.ConvexOS    8.2 (Berkeley) 3/5/94
  924.   #
  925.   
  926.   
  927. --- 7,13 ----
  928.   #
  929.   #  This has been tested on CxOS 11.0 beta 1 and 10.x.
  930.   #
  931. ! #    @(#)Makefile.ConvexOS    8.3 (Berkeley) 4/11/94
  932.   #
  933.   
  934.   
  935. ***************
  936. *** 71,87 ****
  937.   sendmail: ${BEFORE} ${OBJS}
  938.       ${CC} -o sendmail ${OBJS} ${LIBDIRS} ${LIBS}
  939.   
  940.   aliases.0: aliases.5
  941. !     nroff -h -mandoc aliases.5 > aliases.0
  942.   
  943.   mailq.0: mailq.1
  944. !     nroff -h -mandoc mailq.1 > mailq.0
  945.   
  946.   newaliases.0: newaliases.1
  947. !     nroff -h -mandoc newaliases.1 > newaliases.0
  948.   
  949.   sendmail.0: sendmail.8
  950. !     nroff -h -mandoc sendmail.8 > sendmail.0
  951.   
  952.   install: install-sendmail install-docs
  953.   
  954. --- 71,89 ----
  955.   sendmail: ${BEFORE} ${OBJS}
  956.       ${CC} -o sendmail ${OBJS} ${LIBDIRS} ${LIBS}
  957.   
  958. + NROFF=    nroff -h
  959.   aliases.0: aliases.5
  960. !     ${NROFF} -mandoc aliases.5 > aliases.0
  961.   
  962.   mailq.0: mailq.1
  963. !     ${NROFF} -mandoc mailq.1 > mailq.0
  964.   
  965.   newaliases.0: newaliases.1
  966. !     ${NROFF} -mandoc newaliases.1 > newaliases.0
  967.   
  968.   sendmail.0: sendmail.8
  969. !     ${NROFF} -mandoc sendmail.8 > sendmail.0
  970.   
  971.   install: install-sendmail install-docs
  972.   
  973. *** src/Makefile.DGUX.OLD    Sat Mar  5 11:50:25 1994
  974. --- src/Makefile.DGUX    Tue Apr 12 07:41:11 1994
  975. ***************
  976. *** 1,7 ****
  977.   #
  978.   #  Tested on DG/UX 5.4.2 by A. Bryan Curnutt <bryan@Stoner.COM>.
  979.   #
  980. ! #    @(#)Makefile.DGUX    8.2 (Berkeley) 3/5/94
  981.   #
  982.   
  983.   # use O=-O (usual) or O=-g (debugging)
  984. --- 1,7 ----
  985.   #
  986.   #  Tested on DG/UX 5.4.2 by A. Bryan Curnutt <bryan@Stoner.COM>.
  987.   #
  988. ! #    @(#)Makefile.DGUX    8.3 (Berkeley) 4/11/94
  989.   #
  990.   
  991.   # use O=-O (usual) or O=-g (debugging)
  992. ***************
  993. *** 67,83 ****
  994.   sendmail: ${BEFORE} ${OBJS}
  995.       ${CC} -o sendmail ${LDOPTS} ${OBJS} ${LIBDIRS} ${LIBS}
  996.   
  997.   aliases.0: aliases.5
  998. !     nroff -h -mandoc aliases.5 > aliases.0
  999.   
  1000.   mailq.0: mailq.1
  1001. !     nroff -h -mandoc mailq.1 > mailq.0
  1002.   
  1003.   newaliases.0: newaliases.1
  1004. !     nroff -h -mandoc newaliases.1 > newaliases.0
  1005.   
  1006.   sendmail.0: sendmail.8
  1007. !     nroff -h -mandoc sendmail.8 > sendmail.0
  1008.   
  1009.   install: install-sendmail install-docs
  1010.   
  1011. --- 67,85 ----
  1012.   sendmail: ${BEFORE} ${OBJS}
  1013.       ${CC} -o sendmail ${LDOPTS} ${OBJS} ${LIBDIRS} ${LIBS}
  1014.   
  1015. + NROFF=    nroff -h
  1016.   aliases.0: aliases.5
  1017. !     ${NROFF} -mandoc aliases.5 > aliases.0
  1018.   
  1019.   mailq.0: mailq.1
  1020. !     ${NROFF} -mandoc mailq.1 > mailq.0
  1021.   
  1022.   newaliases.0: newaliases.1
  1023. !     ${NROFF} -mandoc newaliases.1 > newaliases.0
  1024.   
  1025.   sendmail.0: sendmail.8
  1026. !     ${NROFF} -mandoc sendmail.8 > sendmail.0
  1027.   
  1028.   install: install-sendmail install-docs
  1029.   
  1030. *** src/Makefile.Dell.OLD    Sat Mar  5 11:50:25 1994
  1031. --- src/Makefile.Dell    Tue Apr 12 07:41:12 1994
  1032. ***************
  1033. *** 9,15 ****
  1034.   #    <kim@grendel.lut.fi> -- I haven't tested this myself.  It may
  1035.   #    work on other SVR4 ports.
  1036.   #
  1037. ! #    @(#)Makefile.Dell    8.2 (Berkeley) 3/5/94
  1038.   #
  1039.   
  1040.   # make sure the shell constructs below use the right shell
  1041. --- 9,15 ----
  1042.   #    <kim@grendel.lut.fi> -- I haven't tested this myself.  It may
  1043.   #    work on other SVR4 ports.
  1044.   #
  1045. ! #    @(#)Makefile.Dell    8.3 (Berkeley) 4/11/94
  1046.   #
  1047.   
  1048.   # make sure the shell constructs below use the right shell
  1049. ***************
  1050. *** 79,95 ****
  1051.   sendmail: ${BEFORE} ${OBJS}
  1052.       ${CC} -o sendmail ${OBJS} ${LIBDIRS} ${LIBS}
  1053.   
  1054.   aliases.0: aliases.5
  1055. !     nroff -h -mandoc aliases.5 > aliases.0
  1056.   
  1057.   mailq.0: mailq.1
  1058. !     nroff -h -mandoc mailq.1 > mailq.0
  1059.   
  1060.   newaliases.0: newaliases.1
  1061. !     nroff -h -mandoc newaliases.1 > newaliases.0
  1062.   
  1063.   sendmail.0: sendmail.8
  1064. !     nroff -h -mandoc sendmail.8 > sendmail.0
  1065.   
  1066.   install: install-sendmail install-docs
  1067.   
  1068. --- 79,97 ----
  1069.   sendmail: ${BEFORE} ${OBJS}
  1070.       ${CC} -o sendmail ${OBJS} ${LIBDIRS} ${LIBS}
  1071.   
  1072. + NROFF=    nroff -h
  1073.   aliases.0: aliases.5
  1074. !     ${NROFF} -mandoc aliases.5 > aliases.0
  1075.   
  1076.   mailq.0: mailq.1
  1077. !     ${NROFF} -mandoc mailq.1 > mailq.0
  1078.   
  1079.   newaliases.0: newaliases.1
  1080. !     ${NROFF} -mandoc newaliases.1 > newaliases.0
  1081.   
  1082.   sendmail.0: sendmail.8
  1083. !     ${NROFF} -mandoc sendmail.8 > sendmail.0
  1084.   
  1085.   install: install-sendmail install-docs
  1086.   
  1087. *** src/Makefile.DomainOS.OLD    Tue Mar  8 10:00:08 1994
  1088. --- src/Makefile.DomainOS    Tue Apr 12 09:27:04 1994
  1089. ***************
  1090. *** 7,13 ****
  1091.   #
  1092.   #  This has been tested on DomainOS 10.3.5
  1093.   #
  1094. ! #    @(#)Makefile.DomainOS    8.3 (Berkeley) 3/8/94
  1095.   #
  1096.   #
  1097.   
  1098. --- 7,13 ----
  1099.   #
  1100.   #  This has been tested on DomainOS 10.3.5
  1101.   #
  1102. ! #    @(#)Makefile.DomainOS    8.5 (Berkeley) 4/12/94
  1103.   #
  1104.   #
  1105.   
  1106. ***************
  1107. *** 49,55 ****
  1108.   BINDIR=    ${DESTDIR}/usr/lib
  1109.   
  1110.   # location of sendmail.st file (usually /var/log or /usr/lib)
  1111. ! STDIR=    ${DESTDIR}/usr/adm
  1112.   
  1113.   # location of sendmail.hf file (usually /usr/share/misc or /usr/lib)
  1114.   HFDIR=    ${DESTDIR}/usr/lib
  1115. --- 49,55 ----
  1116.   BINDIR=    ${DESTDIR}/usr/lib
  1117.   
  1118.   # location of sendmail.st file (usually /var/log or /usr/lib)
  1119. ! STDIR=    ${DESTDIR}/usr/lib
  1120.   
  1121.   # location of sendmail.hf file (usually /usr/share/misc or /usr/lib)
  1122.   HFDIR=    ${DESTDIR}/usr/lib
  1123. ***************
  1124. *** 89,105 ****
  1125.       echo "#include <sys/dir.h>" > dirent.h
  1126.       echo "#define dirent    direct" >> dirent.h
  1127.   
  1128.   aliases.0: aliases.5
  1129. !     nroff -h -mandoc aliases.5 > aliases.0
  1130.   
  1131.   mailq.0: mailq.1
  1132. !     nroff -h -mandoc mailq.1 > mailq.0
  1133.   
  1134.   newaliases.0: newaliases.1
  1135. !     nroff -h -mandoc newaliases.1 > newaliases.0
  1136.   
  1137.   sendmail.0: sendmail.8
  1138. !     nroff -h -mandoc sendmail.8 > sendmail.0
  1139.   
  1140.   install: install-sendmail install-docs
  1141.   
  1142. --- 89,107 ----
  1143.       echo "#include <sys/dir.h>" > dirent.h
  1144.       echo "#define dirent    direct" >> dirent.h
  1145.   
  1146. + NROFF=    nroff -h
  1147.   aliases.0: aliases.5
  1148. !     ${NROFF} -mandoc aliases.5 > aliases.0
  1149.   
  1150.   mailq.0: mailq.1
  1151. !     ${NROFF} -mandoc mailq.1 > mailq.0
  1152.   
  1153.   newaliases.0: newaliases.1
  1154. !     ${NROFF} -mandoc newaliases.1 > newaliases.0
  1155.   
  1156.   sendmail.0: sendmail.8
  1157. !     ${NROFF} -mandoc sendmail.8 > sendmail.0
  1158.   
  1159.   install: install-sendmail install-docs
  1160.   
  1161. *** src/Makefile.Dynix.OLD    Sat Mar  5 11:50:25 1994
  1162. --- src/Makefile.Dynix    Tue Apr 12 07:41:12 1994
  1163. ***************
  1164. *** 11,17 ****
  1165.   #    instead.  I compiled it with gcc 1.40a.  The -lseq is to pick
  1166.   #    up getopt.''
  1167.   #
  1168. ! #    @(#)Makefile.Dynix    8.2 (Berkeley) 3/5/94
  1169.   #
  1170.   
  1171.   CC= gcc
  1172. --- 11,17 ----
  1173.   #    instead.  I compiled it with gcc 1.40a.  The -lseq is to pick
  1174.   #    up getopt.''
  1175.   #
  1176. ! #    @(#)Makefile.Dynix    8.3 (Berkeley) 4/11/94
  1177.   #
  1178.   
  1179.   CC= gcc
  1180. ***************
  1181. *** 79,95 ****
  1182.   sendmail: ${BEFORE} ${OBJS}
  1183.       ${CC} -o sendmail ${LDOPTS} ${OBJS} ${LIBDIRS} ${LIBS}
  1184.   
  1185.   aliases.0: aliases.5
  1186. !     nroff -h -mandoc aliases.5 > aliases.0
  1187.   
  1188.   mailq.0: mailq.1
  1189. !     nroff -h -mandoc mailq.1 > mailq.0
  1190.   
  1191.   newaliases.0: newaliases.1
  1192. !     nroff -h -mandoc newaliases.1 > newaliases.0
  1193.   
  1194.   sendmail.0: sendmail.8
  1195. !     nroff -h -mandoc sendmail.8 > sendmail.0
  1196.   
  1197.   install: install-sendmail install-docs
  1198.   
  1199. --- 79,97 ----
  1200.   sendmail: ${BEFORE} ${OBJS}
  1201.       ${CC} -o sendmail ${LDOPTS} ${OBJS} ${LIBDIRS} ${LIBS}
  1202.   
  1203. + NROFF=    nroff -h
  1204.   aliases.0: aliases.5
  1205. !     ${NROFF} -mandoc aliases.5 > aliases.0
  1206.   
  1207.   mailq.0: mailq.1
  1208. !     ${NROFF} -mandoc mailq.1 > mailq.0
  1209.   
  1210.   newaliases.0: newaliases.1
  1211. !     ${NROFF} -mandoc newaliases.1 > newaliases.0
  1212.   
  1213.   sendmail.0: sendmail.8
  1214. !     ${NROFF} -mandoc sendmail.8 > sendmail.0
  1215.   
  1216.   install: install-sendmail install-docs
  1217.   
  1218. *** src/Makefile.HP-UX.OLD    Sat Mar  5 11:50:24 1994
  1219. --- src/Makefile.HP-UX    Tue Apr 12 07:41:12 1994
  1220. ***************
  1221. *** 7,13 ****
  1222.   #
  1223.   #  This has been tested on HP-UX 8.07 on 7xx series.
  1224.   #
  1225. ! #    @(#)Makefile.HP-UX    8.2 (Berkeley) 3/5/94
  1226.   #
  1227.   
  1228.   # use O=-O (usual) or O=-g (debugging)
  1229. --- 7,13 ----
  1230.   #
  1231.   #  This has been tested on HP-UX 8.07 on 7xx series.
  1232.   #
  1233. ! #    @(#)Makefile.HP-UX    8.3 (Berkeley) 4/11/94
  1234.   #
  1235.   
  1236.   # use O=-O (usual) or O=-g (debugging)
  1237. ***************
  1238. *** 72,88 ****
  1239.   sendmail: ${BEFORE} ${OBJS}
  1240.       ${CC} -o sendmail ${OBJS} ${LIBDIRS} ${LIBS}
  1241.   
  1242.   aliases.0: aliases.5
  1243. !     nroff -h -mandoc aliases.5 > aliases.0
  1244.   
  1245.   mailq.0: mailq.1
  1246. !     nroff -h -mandoc mailq.1 > mailq.0
  1247.   
  1248.   newaliases.0: newaliases.1
  1249. !     nroff -h -mandoc newaliases.1 > newaliases.0
  1250.   
  1251.   sendmail.0: sendmail.8
  1252. !     nroff -h -mandoc sendmail.8 > sendmail.0
  1253.   
  1254.   install: install-sendmail install-docs
  1255.   
  1256. --- 72,90 ----
  1257.   sendmail: ${BEFORE} ${OBJS}
  1258.       ${CC} -o sendmail ${OBJS} ${LIBDIRS} ${LIBS}
  1259.   
  1260. + NROFF=    nroff -h
  1261.   aliases.0: aliases.5
  1262. !     ${NROFF} -mandoc aliases.5 > aliases.0
  1263.   
  1264.   mailq.0: mailq.1
  1265. !     ${NROFF} -mandoc mailq.1 > mailq.0
  1266.   
  1267.   newaliases.0: newaliases.1
  1268. !     ${NROFF} -mandoc newaliases.1 > newaliases.0
  1269.   
  1270.   sendmail.0: sendmail.8
  1271. !     ${NROFF} -mandoc sendmail.8 > sendmail.0
  1272.   
  1273.   install: install-sendmail install-docs
  1274.   
  1275. *** src/Makefile.IRIX.OLD    Fri Mar 11 13:01:34 1994
  1276. --- src/Makefile.IRIX    Tue Apr 12 07:41:12 1994
  1277. ***************
  1278. *** 7,13 ****
  1279.   #
  1280.   #  This has been tested on IRIX 4.0.4.
  1281.   #
  1282. ! #    @(#)Makefile.IRIX    8.3 (Berkeley) 3/11/94
  1283.   #
  1284.   SHELL=    /bin/sh
  1285.   
  1286. --- 7,13 ----
  1287.   #
  1288.   #  This has been tested on IRIX 4.0.4.
  1289.   #
  1290. ! #    @(#)Makefile.IRIX    8.4 (Berkeley) 4/11/94
  1291.   #
  1292.   SHELL=    /bin/sh
  1293.   
  1294. ***************
  1295. *** 73,89 ****
  1296.   sendmail: ${BEFORE} ${OBJS}
  1297.       ${CC} -o sendmail ${OBJS} ${LIBDIRS} ${LIBS}
  1298.   
  1299.   aliases.0: aliases.5
  1300. !     nroff -h -mandoc aliases.5 > aliases.0
  1301.   
  1302.   mailq.0: mailq.1
  1303. !     nroff -h -mandoc mailq.1 > mailq.0
  1304.   
  1305.   newaliases.0: newaliases.1
  1306. !     nroff -h -mandoc newaliases.1 > newaliases.0
  1307.   
  1308.   sendmail.0: sendmail.8
  1309. !     nroff -h -mandoc sendmail.8 > sendmail.0
  1310.   
  1311.   install: install-sendmail install-docs
  1312.   
  1313. --- 73,91 ----
  1314.   sendmail: ${BEFORE} ${OBJS}
  1315.       ${CC} -o sendmail ${OBJS} ${LIBDIRS} ${LIBS}
  1316.   
  1317. + NROFF=    nroff -h
  1318.   aliases.0: aliases.5
  1319. !     ${NROFF} -mandoc aliases.5 > aliases.0
  1320.   
  1321.   mailq.0: mailq.1
  1322. !     ${NROFF} -mandoc mailq.1 > mailq.0
  1323.   
  1324.   newaliases.0: newaliases.1
  1325. !     ${NROFF} -mandoc newaliases.1 > newaliases.0
  1326.   
  1327.   sendmail.0: sendmail.8
  1328. !     ${NROFF} -mandoc sendmail.8 > sendmail.0
  1329.   
  1330.   install: install-sendmail install-docs
  1331.   
  1332. *** src/Makefile.Linux.OLD    Wed Mar  9 12:52:19 1994
  1333. --- src/Makefile.Linux    Tue Apr 12 07:41:13 1994
  1334. ***************
  1335. *** 11,17 ****
  1336.   #  Makefile is likely to require a lot of customization.  Read it over
  1337.   #  carefully before proceeding.
  1338.   #
  1339. ! #    @(#)Makefile.Linux    8.6 (Berkeley) 3/9/94
  1340.   #
  1341.   
  1342.   # use O=-O (usual) or O=-g (debugging)
  1343. --- 11,17 ----
  1344.   #  Makefile is likely to require a lot of customization.  Read it over
  1345.   #  carefully before proceeding.
  1346.   #
  1347. ! #    @(#)Makefile.Linux    8.7 (Berkeley) 4/11/94
  1348.   #
  1349.   
  1350.   # use O=-O (usual) or O=-g (debugging)
  1351. ***************
  1352. *** 90,96 ****
  1353.       ${NROFF} -mandoc aliases.5 > aliases.0
  1354.   
  1355.   mailq.0: mailq.1
  1356. !     nroff -h -mandoc mailq.1 > mailq.0
  1357.   
  1358.   newaliases.0: newaliases.1
  1359.       ${NROFF} -mandoc newaliases.1 > newaliases.0
  1360. --- 90,96 ----
  1361.       ${NROFF} -mandoc aliases.5 > aliases.0
  1362.   
  1363.   mailq.0: mailq.1
  1364. !     ${NROFF} -mandoc mailq.1 > mailq.0
  1365.   
  1366.   newaliases.0: newaliases.1
  1367.       ${NROFF} -mandoc newaliases.1 > newaliases.0
  1368. *** src/Makefile.Mach386.OLD    Sat Mar  5 11:50:25 1994
  1369. --- src/Makefile.Mach386    Tue Apr 12 07:41:13 1994
  1370. ***************
  1371. *** 5,11 ****
  1372.   #  old make program (I recommend that you get and port the new make if you
  1373.   #  are going to be doing any signficant work on sendmail).
  1374.   #
  1375. ! #    @(#)Makefile.Mach386    8.2 (Berkeley) 3/5/94
  1376.   #
  1377.   
  1378.   CC=    gcc
  1379. --- 5,11 ----
  1380.   #  old make program (I recommend that you get and port the new make if you
  1381.   #  are going to be doing any signficant work on sendmail).
  1382.   #
  1383. ! #    @(#)Makefile.Mach386    8.3 (Berkeley) 4/11/94
  1384.   #
  1385.   
  1386.   CC=    gcc
  1387. ***************
  1388. *** 73,89 ****
  1389.   sendmail: ${BEFORE} ${OBJS}
  1390.       ${CC} -o sendmail ${LDOPTS} ${OBJS} ${LIBDIRS} ${LIBS}
  1391.   
  1392.   aliases.0: aliases.5
  1393. !     nroff -h -mandoc aliases.5 > aliases.0
  1394.   
  1395.   mailq.0: mailq.1
  1396. !     nroff -h -mandoc mailq.1 > mailq.0
  1397.   
  1398.   newaliases.0: newaliases.1
  1399. !     nroff -h -mandoc newaliases.1 > newaliases.0
  1400.   
  1401.   sendmail.0: sendmail.8
  1402. !     nroff -h -mandoc sendmail.8 > sendmail.0
  1403.   
  1404.   install: install-sendmail install-docs
  1405.   
  1406. --- 73,91 ----
  1407.   sendmail: ${BEFORE} ${OBJS}
  1408.       ${CC} -o sendmail ${LDOPTS} ${OBJS} ${LIBDIRS} ${LIBS}
  1409.   
  1410. + NROFF=    nroff -h
  1411.   aliases.0: aliases.5
  1412. !     ${NROFF} -mandoc aliases.5 > aliases.0
  1413.   
  1414.   mailq.0: mailq.1
  1415. !     ${NROFF} -mandoc mailq.1 > mailq.0
  1416.   
  1417.   newaliases.0: newaliases.1
  1418. !     ${NROFF} -mandoc newaliases.1 > newaliases.0
  1419.   
  1420.   sendmail.0: sendmail.8
  1421. !     ${NROFF} -mandoc sendmail.8 > sendmail.0
  1422.   
  1423.   install: install-sendmail install-docs
  1424.   
  1425. *** src/Makefile.NCR3000.OLD    Wed Apr 13 10:27:14 1994
  1426. --- src/Makefile.NCR3000    Sat Apr 16 07:27:56 1994
  1427. ***************
  1428. *** 7,13 ****
  1429.   #
  1430.   #    NCR 3000 support from Kevin Darcy <kevin@tech.mis.cfc.com>.
  1431.   #
  1432. ! #    @(#)Makefile.NCR3000    8.1 (Berkeley) 4/13/94
  1433.   #
  1434.   
  1435.   # use O=-O (usual) or O=-g (debugging)
  1436. --- 7,13 ----
  1437.   #
  1438.   #    NCR 3000 support from Kevin Darcy <kevin@tech.mis.cfc.com>.
  1439.   #
  1440. ! #    @(#)Makefile.NCR3000    8.2 (Berkeley) 4/16/94
  1441.   #
  1442.   
  1443.   # use O=-O (usual) or O=-g (debugging)
  1444. ***************
  1445. *** 37,43 ****
  1446.   LIBDIRS=-L/usr/ucblib
  1447.   
  1448.   # libraries required on your system
  1449. ! LIBS=    -lc -lelf -lucb -ldbm -lnet -lnsl
  1450.   
  1451.   # location of sendmail binary (usually /usr/sbin or /usr/lib)
  1452.   BINDIR=    ${DESTDIR}/usr/ucblib
  1453. --- 37,43 ----
  1454.   LIBDIRS=-L/usr/ucblib
  1455.   
  1456.   # libraries required on your system
  1457. ! LIBS=    -lsocket -lc -lelf -lucb -ldbm -lnet -lnsl
  1458.   
  1459.   # location of sendmail binary (usually /usr/sbin or /usr/lib)
  1460.   BINDIR=    ${DESTDIR}/usr/ucblib
  1461. *** src/Makefile.NeXT.OLD    Sat Mar  5 11:50:25 1994
  1462. --- src/Makefile.NeXT    Tue Apr 12 07:41:13 1994
  1463. ***************
  1464. *** 7,13 ****
  1465.   #
  1466.   #  This has been tested on NeXT 2.1.
  1467.   #
  1468. ! #    @(#)Makefile.NeXT    8.2 (Berkeley) 3/5/94
  1469.   #
  1470.   
  1471.   # use O=-O (usual) or O=-g (debugging)
  1472. --- 7,13 ----
  1473.   #
  1474.   #  This has been tested on NeXT 2.1.
  1475.   #
  1476. ! #    @(#)Makefile.NeXT    8.3 (Berkeley) 4/11/94
  1477.   #
  1478.   
  1479.   # use O=-O (usual) or O=-g (debugging)
  1480. ***************
  1481. *** 80,96 ****
  1482.       echo "#include <sys/dir.h>" > dirent.h
  1483.       echo "#define dirent    direct" >> dirent.h
  1484.   
  1485.   aliases.0: aliases.5
  1486. !     nroff -h -mandoc aliases.5 > aliases.0
  1487.   
  1488.   mailq.0: mailq.1
  1489. !     nroff -h -mandoc mailq.1 > mailq.0
  1490.   
  1491.   newaliases.0: newaliases.1
  1492. !     nroff -h -mandoc newaliases.1 > newaliases.0
  1493.   
  1494.   sendmail.0: sendmail.8
  1495. !     nroff -h -mandoc sendmail.8 > sendmail.0
  1496.   
  1497.   install: install-sendmail install-docs
  1498.   
  1499. --- 80,98 ----
  1500.       echo "#include <sys/dir.h>" > dirent.h
  1501.       echo "#define dirent    direct" >> dirent.h
  1502.   
  1503. + NROFF=    nroff -h
  1504.   aliases.0: aliases.5
  1505. !     ${NROFF} -mandoc aliases.5 > aliases.0
  1506.   
  1507.   mailq.0: mailq.1
  1508. !     ${NROFF} -mandoc mailq.1 > mailq.0
  1509.   
  1510.   newaliases.0: newaliases.1
  1511. !     ${NROFF} -mandoc newaliases.1 > newaliases.0
  1512.   
  1513.   sendmail.0: sendmail.8
  1514. !     ${NROFF} -mandoc sendmail.8 > sendmail.0
  1515.   
  1516.   install: install-sendmail install-docs
  1517.   
  1518. No differences encountered
  1519. *** src/Makefile.OSF1.OLD    Sat Mar  5 11:50:26 1994
  1520. --- src/Makefile.OSF1    Tue Apr 12 07:41:13 1994
  1521. ***************
  1522. *** 7,13 ****
  1523.   #
  1524.   #  This has been tested on OSF/1 1.3
  1525.   #
  1526. ! #    @(#)Makefile.OSF1    8.2 (Berkeley) 3/5/94
  1527.   #
  1528.   
  1529.   # use O=-O (usual) or O=-g (debugging)
  1530. --- 7,13 ----
  1531.   #
  1532.   #  This has been tested on OSF/1 1.3
  1533.   #
  1534. ! #    @(#)Makefile.OSF1    8.3 (Berkeley) 4/11/94
  1535.   #
  1536.   
  1537.   # use O=-O (usual) or O=-g (debugging)
  1538. ***************
  1539. *** 73,89 ****
  1540.   sendmail: ${BEFORE} ${OBJS}
  1541.       ${CC} -o sendmail ${LDADD} ${OBJS} ${LIBDIRS} ${LIBS}
  1542.   
  1543.   aliases.0: aliases.5
  1544. !     nroff -h -mandoc aliases.5 > aliases.0
  1545.   
  1546.   mailq.0: mailq.1
  1547. !     nroff -h -mandoc mailq.1 > mailq.0
  1548.   
  1549.   newaliases.0: newaliases.1
  1550. !     nroff -h -mandoc newaliases.1 > newaliases.0
  1551.   
  1552.   sendmail.0: sendmail.8
  1553. !     nroff -h -mandoc sendmail.8 > sendmail.0
  1554.   
  1555.   install: install-sendmail install-docs
  1556.   
  1557. --- 73,91 ----
  1558.   sendmail: ${BEFORE} ${OBJS}
  1559.       ${CC} -o sendmail ${LDADD} ${OBJS} ${LIBDIRS} ${LIBS}
  1560.   
  1561. + NROFF=    nroff -h
  1562.   aliases.0: aliases.5
  1563. !     ${NROFF} -mandoc aliases.5 > aliases.0
  1564.   
  1565.   mailq.0: mailq.1
  1566. !     ${NROFF} -mandoc mailq.1 > mailq.0
  1567.   
  1568.   newaliases.0: newaliases.1
  1569. !     ${NROFF} -mandoc newaliases.1 > newaliases.0
  1570.   
  1571.   sendmail.0: sendmail.8
  1572. !     ${NROFF} -mandoc sendmail.8 > sendmail.0
  1573.   
  1574.   install: install-sendmail install-docs
  1575.   
  1576. *** src/Makefile.PTX.OLD    Sat Mar  5 11:50:26 1994
  1577. --- src/Makefile.PTX    Tue Apr 12 07:41:13 1994
  1578. ***************
  1579. *** 9,15 ****
  1580.   #
  1581.   #    From Tim "Pinball Wizard" Wright <timw@sequent.com>.
  1582.   #
  1583. ! #    @(#)Makefile.PTX    8.2 (Berkeley) 3/5/94
  1584.   #
  1585.   
  1586.   # use O=-O (usual) or O=-g (debugging)
  1587. --- 9,15 ----
  1588.   #
  1589.   #    From Tim "Pinball Wizard" Wright <timw@sequent.com>.
  1590.   #
  1591. ! #    @(#)Makefile.PTX    8.3 (Berkeley) 4/11/94
  1592.   #
  1593.   
  1594.   # use O=-O (usual) or O=-g (debugging)
  1595. ***************
  1596. *** 78,91 ****
  1597.   sendmail: $& ${BEFORE} ${OBJS}
  1598.       ${CC} -o sendmail ${LDOPTS} ${OBJS} ${LIBDIRS} ${LIBS}
  1599.   
  1600.   aliases.0: aliases.5
  1601. !     nroff -h -mandoc aliases.5 > aliases.0
  1602.   
  1603.   newaliases.0: newaliases.1
  1604. !     nroff -h -mandoc newaliases.1 > newaliases.0
  1605.   
  1606.   sendmail.0: sendmail.8
  1607. !     nroff -h -mandoc sendmail.8 > sendmail.0
  1608.   
  1609.   INSTALL=install
  1610.   
  1611. --- 78,96 ----
  1612.   sendmail: $& ${BEFORE} ${OBJS}
  1613.       ${CC} -o sendmail ${LDOPTS} ${OBJS} ${LIBDIRS} ${LIBS}
  1614.   
  1615. + NROFF=    nroff -h
  1616.   aliases.0: aliases.5
  1617. !     ${NROFF} -mandoc aliases.5 > aliases.0
  1618.   
  1619. + mailq.0: mailq.1
  1620. +     ${NROFF} -mandoc mailq.1 > mailq.0
  1621.   newaliases.0: newaliases.1
  1622. !     ${NROFF} -mandoc newaliases.1 > newaliases.0
  1623.   
  1624.   sendmail.0: sendmail.8
  1625. !     ${NROFF} -mandoc sendmail.8 > sendmail.0
  1626.   
  1627.   INSTALL=install
  1628.   
  1629. *** src/Makefile.RISCos.OLD    Sat Mar  5 11:50:26 1994
  1630. --- src/Makefile.RISCos    Tue Apr 12 07:41:14 1994
  1631. ***************
  1632. *** 7,13 ****
  1633.   #
  1634.   #    For Mips RISC/os 4.52.
  1635.   #
  1636. ! #    @(#)Makefile.RISCos    8.2 (Berkeley) 3/5/94
  1637.   #
  1638.   
  1639.   # use O=-O (usual) or O=-g (debugging)
  1640. --- 7,13 ----
  1641.   #
  1642.   #    For Mips RISC/os 4.52.
  1643.   #
  1644. ! #    @(#)Makefile.RISCos    8.3 (Berkeley) 4/11/94
  1645.   #
  1646.   
  1647.   # use O=-O (usual) or O=-g (debugging)
  1648. ***************
  1649. *** 83,99 ****
  1650.       echo "#include <sys/dir.h>" > dirent.h
  1651.       echo "#define dirent    direct" >> dirent.h
  1652.   
  1653.   aliases.0: aliases.5
  1654. !     nroff -h -mandoc aliases.5 > aliases.0
  1655.   
  1656.   mailq.0: mailq.1
  1657. !     nroff -h -mandoc mailq.1 > mailq.0
  1658.   
  1659.   newaliases.0: newaliases.1
  1660. !     nroff -h -mandoc newaliases.1 > newaliases.0
  1661.   
  1662.   sendmail.0: sendmail.8
  1663. !     nroff -h -mandoc sendmail.8 > sendmail.0
  1664.   
  1665.   install: install-sendmail install-docs
  1666.   
  1667. --- 83,101 ----
  1668.       echo "#include <sys/dir.h>" > dirent.h
  1669.       echo "#define dirent    direct" >> dirent.h
  1670.   
  1671. + NROFF=    nroff -h
  1672.   aliases.0: aliases.5
  1673. !     ${NROFF} -mandoc aliases.5 > aliases.0
  1674.   
  1675.   mailq.0: mailq.1
  1676. !     ${NROFF} -mandoc mailq.1 > mailq.0
  1677.   
  1678.   newaliases.0: newaliases.1
  1679. !     ${NROFF} -mandoc newaliases.1 > newaliases.0
  1680.   
  1681.   sendmail.0: sendmail.8
  1682. !     ${NROFF} -mandoc sendmail.8 > sendmail.0
  1683.   
  1684.   install: install-sendmail install-docs
  1685.   
  1686. *** src/Makefile.SCO.OLD    Sat Mar  5 11:50:26 1994
  1687. --- src/Makefile.SCO    Tue Apr 12 14:18:59 1994
  1688. ***************
  1689. *** 7,13 ****
  1690.   #
  1691.   #  This has been tested on SCO.
  1692.   #
  1693. ! #    @(#)Makefile.SCO    8.2 (Berkeley) 3/5/94
  1694.   #
  1695.   
  1696.   # use O=-O (usual) or O=-g (debugging)
  1697. --- 7,13 ----
  1698.   #
  1699.   #  This has been tested on SCO.
  1700.   #
  1701. ! #    @(#)Makefile.SCO    8.4 (Berkeley) 4/12/94
  1702.   #
  1703.   
  1704.   # use O=-O (usual) or O=-g (debugging)
  1705. ***************
  1706. *** 46,52 ****
  1707.   HFDIR=    ${DESTDIR}/usr/lib
  1708.   
  1709.   # additional .o files needed
  1710. ! OBJADD=    fsync.o
  1711.   
  1712.   ###################  end of user configuration flags  ######################
  1713.   
  1714. --- 46,52 ----
  1715.   HFDIR=    ${DESTDIR}/usr/lib
  1716.   
  1717.   # additional .o files needed
  1718. ! OBJADD=    
  1719.   
  1720.   ###################  end of user configuration flags  ######################
  1721.   
  1722. ***************
  1723. *** 70,86 ****
  1724.   sendmail: ${BEFORE} ${OBJS}
  1725.       ${CC} -o sendmail ${OBJS} ${LIBDIRS} ${LIBS}
  1726.   
  1727.   aliases.0: aliases.5
  1728. !     nroff -h -mandoc aliases.5 > aliases.0
  1729.   
  1730.   mailq.0: mailq.1
  1731. !     nroff -h -mandoc mailq.1 > mailq.0
  1732.   
  1733.   newaliases.0: newaliases.1
  1734. !     nroff -h -mandoc newaliases.1 > newaliases.0
  1735.   
  1736.   sendmail.0: sendmail.8
  1737. !     nroff -h -mandoc sendmail.8 > sendmail.0
  1738.   
  1739.   install: install-sendmail install-docs
  1740.   
  1741. --- 70,88 ----
  1742.   sendmail: ${BEFORE} ${OBJS}
  1743.       ${CC} -o sendmail ${OBJS} ${LIBDIRS} ${LIBS}
  1744.   
  1745. + NROFF=    nroff -h
  1746.   aliases.0: aliases.5
  1747. !     ${NROFF} -mandoc aliases.5 > aliases.0
  1748.   
  1749.   mailq.0: mailq.1
  1750. !     ${NROFF} -mandoc mailq.1 > mailq.0
  1751.   
  1752.   newaliases.0: newaliases.1
  1753. !     ${NROFF} -mandoc newaliases.1 > newaliases.0
  1754.   
  1755.   sendmail.0: sendmail.8
  1756. !     ${NROFF} -mandoc sendmail.8 > sendmail.0
  1757.   
  1758.   install: install-sendmail install-docs
  1759.   
  1760. *** src/Makefile.SVR4.OLD    Sat Mar  5 11:50:26 1994
  1761. --- src/Makefile.SVR4    Tue Apr 12 07:41:14 1994
  1762. ***************
  1763. *** 9,15 ****
  1764.   #    <kim@grendel.lut.fi> -- I haven't tested this myself.  It may
  1765.   #    work on other SVR4 ports.
  1766.   #
  1767. ! #    @(#)Makefile.SVR4    8.2 (Berkeley) 3/5/94
  1768.   #
  1769.   
  1770.   # make sure the shell constructs below use the right shell
  1771. --- 9,15 ----
  1772.   #    <kim@grendel.lut.fi> -- I haven't tested this myself.  It may
  1773.   #    work on other SVR4 ports.
  1774.   #
  1775. ! #    @(#)Makefile.SVR4    8.3 (Berkeley) 4/11/94
  1776.   #
  1777.   
  1778.   # make sure the shell constructs below use the right shell
  1779. ***************
  1780. *** 79,95 ****
  1781.   sendmail: ${BEFORE} ${OBJS}
  1782.       ${CC} -o sendmail ${OBJS} ${LIBDIRS} ${LIBS}
  1783.   
  1784.   aliases.0: aliases.5
  1785. !     nroff -h -mandoc aliases.5 > aliases.0
  1786.   
  1787.   mailq.0: mailq.1
  1788. !     nroff -h -mandoc mailq.1 > mailq.0
  1789.   
  1790.   newaliases.0: newaliases.1
  1791. !     nroff -h -mandoc newaliases.1 > newaliases.0
  1792.   
  1793.   sendmail.0: sendmail.8
  1794. !     nroff -h -mandoc sendmail.8 > sendmail.0
  1795.   
  1796.   install: install-sendmail install-docs
  1797.   
  1798. --- 79,97 ----
  1799.   sendmail: ${BEFORE} ${OBJS}
  1800.       ${CC} -o sendmail ${OBJS} ${LIBDIRS} ${LIBS}
  1801.   
  1802. + NROFF=    nroff -h
  1803.   aliases.0: aliases.5
  1804. !     ${NROFF} -mandoc aliases.5 > aliases.0
  1805.   
  1806.   mailq.0: mailq.1
  1807. !     ${NROFF} -mandoc mailq.1 > mailq.0
  1808.   
  1809.   newaliases.0: newaliases.1
  1810. !     ${NROFF} -mandoc newaliases.1 > newaliases.0
  1811.   
  1812.   sendmail.0: sendmail.8
  1813. !     ${NROFF} -mandoc sendmail.8 > sendmail.0
  1814.   
  1815.   install: install-sendmail install-docs
  1816.   
  1817. *** src/Makefile.Solaris.OLD    Sat Mar  5 11:50:26 1994
  1818. --- src/Makefile.Solaris    Tue Apr 12 14:19:18 1994
  1819. ***************
  1820. *** 7,13 ****
  1821.   #
  1822.   #  This has been tested on Solaris 2.1 and 2.2.
  1823.   #
  1824. ! #    @(#)Makefile.Solaris    8.2 (Berkeley) 3/5/94
  1825.   #
  1826.   
  1827.   # use O=-O (usual) or O=-g (debugging)
  1828. --- 7,13 ----
  1829.   #
  1830.   #  This has been tested on Solaris 2.1 and 2.2.
  1831.   #
  1832. ! #    @(#)Makefile.Solaris    8.5 (Berkeley) 4/12/94
  1833.   #
  1834.   
  1835.   # use O=-O (usual) or O=-g (debugging)
  1836. ***************
  1837. *** 32,38 ****
  1838.   # see also conf.h for additional compilation flags
  1839.   
  1840.   # include directories
  1841. ! INCDIRS=-I/usr/sww/include/db -I.
  1842.   
  1843.   # library directories
  1844.   LIBDIRS=-L/usr/sww/lib
  1845. --- 32,38 ----
  1846.   # see also conf.h for additional compilation flags
  1847.   
  1848.   # include directories
  1849. ! INCDIRS=-I/usr/sww/include/db
  1850.   
  1851.   # library directories
  1852.   LIBDIRS=-L/usr/sww/lib
  1853. ***************
  1854. *** 52,57 ****
  1855. --- 52,60 ----
  1856.   # additional .o files needed
  1857.   OBJADD=
  1858.   
  1859. + # things to be made before compilation begins
  1860. + BEFORE=    sysexits.h
  1861.   ###################  end of user configuration flags  ######################
  1862.   
  1863.   CFLAGS=    -I. $O ${INCDIRS} ${DBMDEF} ${ENVDEF}
  1864. ***************
  1865. *** 75,91 ****
  1866.   sendmail: ${BEFORE} ${OBJS}
  1867.       ${CC} -o sendmail ${OBJS} ${LIBDIRS} ${LIBS}
  1868.   
  1869.   aliases.0: aliases.5
  1870. !     nroff -h -mandoc aliases.5 > aliases.0
  1871.   
  1872.   mailq.0: mailq.1
  1873. !     nroff -h -mandoc mailq.1 > mailq.0
  1874.   
  1875.   newaliases.0: newaliases.1
  1876. !     nroff -h -mandoc newaliases.1 > newaliases.0
  1877.   
  1878.   sendmail.0: sendmail.8
  1879. !     nroff -h -mandoc sendmail.8 > sendmail.0
  1880.   
  1881.   install: install-sendmail install-docs
  1882.   
  1883. --- 78,99 ----
  1884.   sendmail: ${BEFORE} ${OBJS}
  1885.       ${CC} -o sendmail ${OBJS} ${LIBDIRS} ${LIBS}
  1886.   
  1887. + sysexits.h: /usr/ucbinclude/sysexits.h
  1888. +     ln -s /usr/ucbinclude/sysexits.h
  1889. + NROFF=    nroff -h
  1890.   aliases.0: aliases.5
  1891. !     ${NROFF} -mandoc aliases.5 > aliases.0
  1892.   
  1893.   mailq.0: mailq.1
  1894. !     ${NROFF} -mandoc mailq.1 > mailq.0
  1895.   
  1896.   newaliases.0: newaliases.1
  1897. !     ${NROFF} -mandoc newaliases.1 > newaliases.0
  1898.   
  1899.   sendmail.0: sendmail.8
  1900. !     ${NROFF} -mandoc sendmail.8 > sendmail.0
  1901.   
  1902.   install: install-sendmail install-docs
  1903.   
  1904. *** src/Makefile.SunOS.OLD    Sat Mar  5 11:50:26 1994
  1905. --- src/Makefile.SunOS    Tue Apr 12 07:41:14 1994
  1906. ***************
  1907. *** 10,16 ****
  1908.   #        create empty files stdlib.h and stddef.h in your
  1909.   #        compile directory.
  1910.   #
  1911. ! #    @(#)Makefile.SunOS    8.2 (Berkeley) 3/5/94
  1912.   #
  1913.   
  1914.   # use O=-O (usual) or O=-g (debugging)
  1915. --- 10,16 ----
  1916.   #        create empty files stdlib.h and stddef.h in your
  1917.   #        compile directory.
  1918.   #
  1919. ! #    @(#)Makefile.SunOS    8.3 (Berkeley) 4/11/94
  1920.   #
  1921.   
  1922.   # use O=-O (usual) or O=-g (debugging)
  1923. ***************
  1924. *** 77,93 ****
  1925.   sendmail: ${BEFORE} ${OBJS}
  1926.       ${CC} -o sendmail ${LDOPTS} ${OBJS} ${LIBDIRS} ${LIBS}
  1927.   
  1928.   aliases.0: aliases.5
  1929. !     nroff -h -mandoc aliases.5 > aliases.0
  1930.   
  1931.   mailq.0: mailq.1
  1932. !     nroff -h -mandoc mailq.1 > mailq.0
  1933.   
  1934.   newaliases.0: newaliases.1
  1935. !     nroff -h -mandoc newaliases.1 > newaliases.0
  1936.   
  1937.   sendmail.0: sendmail.8
  1938. !     nroff -h -mandoc sendmail.8 > sendmail.0
  1939.   
  1940.   install: install-sendmail install-docs
  1941.   
  1942. --- 77,95 ----
  1943.   sendmail: ${BEFORE} ${OBJS}
  1944.       ${CC} -o sendmail ${LDOPTS} ${OBJS} ${LIBDIRS} ${LIBS}
  1945.   
  1946. + NROFF=    nroff -h
  1947.   aliases.0: aliases.5
  1948. !     ${NROFF} -mandoc aliases.5 > aliases.0
  1949.   
  1950.   mailq.0: mailq.1
  1951. !     ${NROFF} -mandoc mailq.1 > mailq.0
  1952.   
  1953.   newaliases.0: newaliases.1
  1954. !     ${NROFF} -mandoc newaliases.1 > newaliases.0
  1955.   
  1956.   sendmail.0: sendmail.8
  1957. !     ${NROFF} -mandoc sendmail.8 > sendmail.0
  1958.   
  1959.   install: install-sendmail install-docs
  1960.   
  1961. *** src/Makefile.SunOS.4.0.3.OLD    Sat Mar  5 11:50:27 1994
  1962. --- src/Makefile.SunOS.4.0.3    Tue Apr 12 07:41:14 1994
  1963. ***************
  1964. *** 8,14 ****
  1965.   #    You may find you need to find versions of some routines
  1966.   #    such as strcasecmp in order to link this on SunOS 4.0.3.
  1967.   #
  1968. ! #    @(#)Makefile.SunOS.4.0.3    8.2 (Berkeley) 3/5/94
  1969.   #
  1970.   
  1971.   # use O=-O (usual) or O=-g (debugging)
  1972. --- 8,14 ----
  1973.   #    You may find you need to find versions of some routines
  1974.   #    such as strcasecmp in order to link this on SunOS 4.0.3.
  1975.   #
  1976. ! #    @(#)Makefile.SunOS.4.0.3    8.3 (Berkeley) 4/11/94
  1977.   #
  1978.   
  1979.   # use O=-O (usual) or O=-g (debugging)
  1980. ***************
  1981. *** 79,95 ****
  1982.   stddef.h stdlib.h:
  1983.       cp /dev/null $@
  1984.   
  1985.   aliases.0: aliases.5
  1986. !     nroff -h -mandoc aliases.5 > aliases.0
  1987.   
  1988.   mailq.0: mailq.1
  1989. !     nroff -h -mandoc mailq.1 > mailq.0
  1990.   
  1991.   newaliases.0: newaliases.1
  1992. !     nroff -h -mandoc newaliases.1 > newaliases.0
  1993.   
  1994.   sendmail.0: sendmail.8
  1995. !     nroff -h -mandoc sendmail.8 > sendmail.0
  1996.   
  1997.   install: install-sendmail install-docs
  1998.   
  1999. --- 79,97 ----
  2000.   stddef.h stdlib.h:
  2001.       cp /dev/null $@
  2002.   
  2003. + NROFF=    nroff -h
  2004.   aliases.0: aliases.5
  2005. !     ${NROFF} -mandoc aliases.5 > aliases.0
  2006.   
  2007.   mailq.0: mailq.1
  2008. !     ${NROFF} -mandoc mailq.1 > mailq.0
  2009.   
  2010.   newaliases.0: newaliases.1
  2011. !     ${NROFF} -mandoc newaliases.1 > newaliases.0
  2012.   
  2013.   sendmail.0: sendmail.8
  2014. !     ${NROFF} -mandoc sendmail.8 > sendmail.0
  2015.   
  2016.   install: install-sendmail install-docs
  2017.   
  2018. *** src/Makefile.SunOS.5.x.OLD    Sat Mar  5 11:50:27 1994
  2019. --- src/Makefile.SunOS.5.x    Tue Apr 12 14:19:18 1994
  2020. ***************
  2021. *** 7,13 ****
  2022.   #
  2023.   #  This has been tested on Solaris 2.3.
  2024.   #
  2025. ! #    @(#)Makefile.SunOS.5.x    8.2 (Berkeley) 3/5/94
  2026.   #
  2027.   
  2028.   # use O=-O (usual) or O=-g (debugging)
  2029. --- 7,13 ----
  2030.   #
  2031.   #  This has been tested on Solaris 2.3.
  2032.   #
  2033. ! #    @(#)Makefile.SunOS.5.x    8.5 (Berkeley) 4/12/94
  2034.   #
  2035.   
  2036.   # use O=-O (usual) or O=-g (debugging)
  2037. ***************
  2038. *** 32,38 ****
  2039.   # see also conf.h for additional compilation flags
  2040.   
  2041.   # include directories
  2042. ! INCDIRS=-I/usr/sww/include/db -I.
  2043.   
  2044.   # library directories
  2045.   LIBDIRS=-L/usr/sww/lib
  2046. --- 32,38 ----
  2047.   # see also conf.h for additional compilation flags
  2048.   
  2049.   # include directories
  2050. ! INCDIRS=-I/usr/sww/include/db
  2051.   
  2052.   # library directories
  2053.   LIBDIRS=-L/usr/sww/lib
  2054. ***************
  2055. *** 52,57 ****
  2056. --- 52,60 ----
  2057.   # additional .o files needed
  2058.   OBJADD=
  2059.   
  2060. + # things to be made before compilation begins
  2061. + BEFORE=    sysexits.h
  2062.   ###################  end of user configuration flags  ######################
  2063.   
  2064.   CFLAGS=    -I. $O ${INCDIRS} ${DBMDEF} ${ENVDEF}
  2065. ***************
  2066. *** 75,91 ****
  2067.   sendmail: ${BEFORE} ${OBJS}
  2068.       ${CC} -o sendmail ${OBJS} ${LIBDIRS} ${LIBS}
  2069.   
  2070.   aliases.0: aliases.5
  2071. !     nroff -h -mandoc aliases.5 > aliases.0
  2072.   
  2073.   mailq.0: mailq.1
  2074. !     nroff -h -mandoc mailq.1 > mailq.0
  2075.   
  2076.   newaliases.0: newaliases.1
  2077. !     nroff -h -mandoc newaliases.1 > newaliases.0
  2078.   
  2079.   sendmail.0: sendmail.8
  2080. !     nroff -h -mandoc sendmail.8 > sendmail.0
  2081.   
  2082.   install: install-sendmail install-docs
  2083.   
  2084. --- 78,99 ----
  2085.   sendmail: ${BEFORE} ${OBJS}
  2086.       ${CC} -o sendmail ${OBJS} ${LIBDIRS} ${LIBS}
  2087.   
  2088. + sysexits.h: /usr/ucbinclude/sysexits.h
  2089. +     ln -s /usr/ucbinclude/sysexits.h
  2090. + NROFF=    nroff -h
  2091.   aliases.0: aliases.5
  2092. !     ${NROFF} -mandoc aliases.5 > aliases.0
  2093.   
  2094.   mailq.0: mailq.1
  2095. !     ${NROFF} -mandoc mailq.1 > mailq.0
  2096.   
  2097.   newaliases.0: newaliases.1
  2098. !     ${NROFF} -mandoc newaliases.1 > newaliases.0
  2099.   
  2100.   sendmail.0: sendmail.8
  2101. !     ${NROFF} -mandoc sendmail.8 > sendmail.0
  2102.   
  2103.   install: install-sendmail install-docs
  2104.   
  2105. *** src/Makefile.Titan.OLD    Sat Mar  5 11:50:27 1994
  2106. --- src/Makefile.Titan    Tue Apr 12 07:41:15 1994
  2107. ***************
  2108. *** 5,11 ****
  2109.   #  old make program (I recommend that you get and port the new make if you
  2110.   #  are going to be doing any signficant work on sendmail).
  2111.   #
  2112. ! #    @(#)Makefile.Titan    8.2 (Berkeley) 3/5/94
  2113.   #
  2114.   
  2115.   # put the compiler in BSD mode
  2116. --- 5,11 ----
  2117.   #  old make program (I recommend that you get and port the new make if you
  2118.   #  are going to be doing any signficant work on sendmail).
  2119.   #
  2120. ! #    @(#)Makefile.Titan    8.3 (Berkeley) 4/11/94
  2121.   #
  2122.   
  2123.   # put the compiler in BSD mode
  2124. ***************
  2125. *** 80,96 ****
  2126.   stddef.h stdlib.h:
  2127.       cp /dev/null $@
  2128.   
  2129.   aliases.0: aliases.5
  2130. !     nroff -h -mandoc aliases.5 > aliases.0
  2131.   
  2132.   mailq.0: mailq.1
  2133. !     nroff -h -mandoc mailq.1 > mailq.0
  2134.   
  2135.   newaliases.0: newaliases.1
  2136. !     nroff -h -mandoc newaliases.1 > newaliases.0
  2137.   
  2138.   sendmail.0: sendmail.8
  2139. !     nroff -h -mandoc sendmail.8 > sendmail.0
  2140.   
  2141.   install: install-sendmail install-docs
  2142.   
  2143. --- 80,98 ----
  2144.   stddef.h stdlib.h:
  2145.       cp /dev/null $@
  2146.   
  2147. + NROFF=    nroff -h
  2148.   aliases.0: aliases.5
  2149. !     ${NROFF} -mandoc aliases.5 > aliases.0
  2150.   
  2151.   mailq.0: mailq.1
  2152. !     ${NROFF} -mandoc mailq.1 > mailq.0
  2153.   
  2154.   newaliases.0: newaliases.1
  2155. !     ${NROFF} -mandoc newaliases.1 > newaliases.0
  2156.   
  2157.   sendmail.0: sendmail.8
  2158. !     ${NROFF} -mandoc sendmail.8 > sendmail.0
  2159.   
  2160.   install: install-sendmail install-docs
  2161.   
  2162. *** src/Makefile.ULTRIX.OLD    Sat Mar  5 11:50:27 1994
  2163. --- src/Makefile.ULTRIX    Tue Apr 12 07:41:15 1994
  2164. ***************
  2165. *** 7,13 ****
  2166.   #
  2167.   #    This has been tested on Ultrix 4.2A and 4.3A.
  2168.   #
  2169. ! #    @(#)Makefile.ULTRIX    8.2 (Berkeley) 3/5/94
  2170.   #
  2171.   
  2172.   # use O=-O (usual) or O=-g (debugging)
  2173. --- 7,13 ----
  2174.   #
  2175.   #    This has been tested on Ultrix 4.2A and 4.3A.
  2176.   #
  2177. ! #    @(#)Makefile.ULTRIX    8.3 (Berkeley) 4/11/94
  2178.   #
  2179.   
  2180.   # use O=-O (usual) or O=-g (debugging)
  2181. ***************
  2182. *** 73,89 ****
  2183.   sendmail: ${BEFORE} ${OBJS}
  2184.       ${CC} -o sendmail ${LDOPTS} ${OBJS} ${LIBDIRS} ${LIBS}
  2185.   
  2186.   aliases.0: aliases.5
  2187. !     nroff -h -mandoc aliases.5 > aliases.0
  2188.   
  2189.   mailq.0: mailq.1
  2190. !     nroff -h -mandoc mailq.1 > mailq.0
  2191.   
  2192.   newaliases.0: newaliases.1
  2193. !     nroff -h -mandoc newaliases.1 > newaliases.0
  2194.   
  2195.   sendmail.0: sendmail.8
  2196. !     nroff -h -mandoc sendmail.8 > sendmail.0
  2197.   
  2198.   install: install-sendmail install-docs
  2199.   
  2200. --- 73,91 ----
  2201.   sendmail: ${BEFORE} ${OBJS}
  2202.       ${CC} -o sendmail ${LDOPTS} ${OBJS} ${LIBDIRS} ${LIBS}
  2203.   
  2204. + NROFF=    nroff -h
  2205.   aliases.0: aliases.5
  2206. !     ${NROFF} -mandoc aliases.5 > aliases.0
  2207.   
  2208.   mailq.0: mailq.1
  2209. !     ${NROFF} -mandoc mailq.1 > mailq.0
  2210.   
  2211.   newaliases.0: newaliases.1
  2212. !     ${NROFF} -mandoc newaliases.1 > newaliases.0
  2213.   
  2214.   sendmail.0: sendmail.8
  2215. !     ${NROFF} -mandoc sendmail.8 > sendmail.0
  2216.   
  2217.   install: install-sendmail install-docs
  2218.   
  2219. *** src/Makefile.UMAX.OLD    Sat Mar  5 11:50:27 1994
  2220. --- src/Makefile.UMAX    Tue Apr 12 07:41:15 1994
  2221. ***************
  2222. *** 7,13 ****
  2223.   #
  2224.   #    This has been tested on Encore UMAX V
  2225.   #
  2226. ! #    @(#)Makefile.UMAX    8.2 (Berkeley) 3/5/94
  2227.   #
  2228.   
  2229.   # use O=-O (usual) or O=-g (debugging)
  2230. --- 7,13 ----
  2231.   #
  2232.   #    This has been tested on Encore UMAX V
  2233.   #
  2234. ! #    @(#)Makefile.UMAX    8.3 (Berkeley) 4/11/94
  2235.   #
  2236.   
  2237.   # use O=-O (usual) or O=-g (debugging)
  2238. ***************
  2239. *** 80,96 ****
  2240.   sendmail: ${BEFORE} ${OBJS}
  2241.       ${CC} -o sendmail ${LDOPTS} ${OBJS} ${LIBDIRS} ${LIBS}
  2242.   
  2243.   aliases.0: aliases.5
  2244. !     nroff -h -mandoc aliases.5 > aliases.0
  2245.   
  2246.   mailq.0: mailq.1
  2247. !     nroff -h -mandoc mailq.1 > mailq.0
  2248.   
  2249.   newaliases.0: newaliases.1
  2250. !     nroff -h -mandoc newaliases.1 > newaliases.0
  2251.   
  2252.   sendmail.0: sendmail.8
  2253. !     nroff -h -mandoc sendmail.8 > sendmail.0
  2254.   
  2255.   install: install-sendmail install-docs
  2256.   
  2257. --- 80,98 ----
  2258.   sendmail: ${BEFORE} ${OBJS}
  2259.       ${CC} -o sendmail ${LDOPTS} ${OBJS} ${LIBDIRS} ${LIBS}
  2260.   
  2261. + NROFF=    nroff -h
  2262.   aliases.0: aliases.5
  2263. !     ${NROFF} -mandoc aliases.5 > aliases.0
  2264.   
  2265.   mailq.0: mailq.1
  2266. !     ${NROFF} -mandoc mailq.1 > mailq.0
  2267.   
  2268.   newaliases.0: newaliases.1
  2269. !     ${NROFF} -mandoc newaliases.1 > newaliases.0
  2270.   
  2271.   sendmail.0: sendmail.8
  2272. !     ${NROFF} -mandoc sendmail.8 > sendmail.0
  2273.   
  2274.   install: install-sendmail install-docs
  2275.   
  2276. *** src/Makefile.dist.OLD    Sat Mar  5 11:50:24 1994
  2277. --- src/Makefile.dist    Tue Apr 12 07:41:15 1994
  2278. ***************
  2279. *** 5,11 ****
  2280.   #  old make program (I recommend that you get and port the new make if you
  2281.   #  are going to be doing any signficant work on sendmail).
  2282.   #
  2283. ! #    @(#)Makefile.dist    8.11 (Berkeley) 3/5/94
  2284.   #
  2285.   
  2286.   # use O=-O (usual) or O=-g (debugging)
  2287. --- 5,11 ----
  2288.   #  old make program (I recommend that you get and port the new make if you
  2289.   #  are going to be doing any signficant work on sendmail).
  2290.   #
  2291. ! #    @(#)Makefile.dist    8.12 (Berkeley) 4/11/94
  2292.   #
  2293.   
  2294.   # use O=-O (usual) or O=-g (debugging)
  2295. ***************
  2296. *** 71,87 ****
  2297.   sendmail: ${BEFORE} ${OBJS}
  2298.       ${CC} -o sendmail ${LDOPTS} ${OBJS} ${LIBDIRS} ${LIBS}
  2299.   
  2300.   aliases.0: aliases.5
  2301. !     nroff -h -mandoc aliases.5 > aliases.0
  2302.   
  2303.   mailq.0: mailq.1
  2304. !     nroff -h -mandoc mailq.1 > mailq.0
  2305.   
  2306.   newaliases.0: newaliases.1
  2307. !     nroff -h -mandoc newaliases.1 > newaliases.0
  2308.   
  2309.   sendmail.0: sendmail.8
  2310. !     nroff -h -mandoc sendmail.8 > sendmail.0
  2311.   
  2312.   INSTALL=install
  2313.   
  2314. --- 71,89 ----
  2315.   sendmail: ${BEFORE} ${OBJS}
  2316.       ${CC} -o sendmail ${LDOPTS} ${OBJS} ${LIBDIRS} ${LIBS}
  2317.   
  2318. + NROFF=    nroff -h
  2319.   aliases.0: aliases.5
  2320. !     ${NROFF} -mandoc aliases.5 > aliases.0
  2321.   
  2322.   mailq.0: mailq.1
  2323. !     ${NROFF} -mandoc mailq.1 > mailq.0
  2324.   
  2325.   newaliases.0: newaliases.1
  2326. !     ${NROFF} -mandoc newaliases.1 > newaliases.0
  2327.   
  2328.   sendmail.0: sendmail.8
  2329. !     ${NROFF} -mandoc sendmail.8 > sendmail.0
  2330.   
  2331.   INSTALL=install
  2332.   
  2333. *** src/READ_ME.OLD    Sun Mar 13 09:38:25 1994
  2334. --- src/READ_ME    Sun Apr 17 07:05:53 1994
  2335. ***************
  2336. *** 30,36 ****
  2337.   # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  2338.   # SUCH DAMAGE.
  2339.   #
  2340. ! #    @(#)READ_ME    8.58 (Berkeley) 3/13/94
  2341.   #
  2342.   
  2343.   This directory contains the source files for sendmail.
  2344. --- 30,36 ----
  2345.   # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  2346.   # SUCH DAMAGE.
  2347.   #
  2348. ! #    @(#)READ_ME    8.61 (Berkeley) 4/17/94
  2349.   #
  2350.   
  2351.   This directory contains the source files for sendmail.
  2352. ***************
  2353. *** 136,142 ****
  2354.   get the latest version from FTP.CS.Berkeley.EDU in /ucb/4bsd.  DO NOT
  2355.   use the version from the Net2 distribution!  However, if you are on
  2356.   BSD/386 or 386BSD-based systems, use the one that already exists
  2357. ! on your system.  You may need to define OLD_NEWDB to do this.]
  2358.   
  2359.   [NOTE WELL: it is CRITICAL that you remove ndbm.o from libdb.a and
  2360.   ndbm.h from the appropriate include directories if you want to get
  2361. --- 136,142 ----
  2362.   get the latest version from FTP.CS.Berkeley.EDU in /ucb/4bsd.  DO NOT
  2363.   use the version from the Net2 distribution!  However, if you are on
  2364.   BSD/386 or 386BSD-based systems, use the one that already exists
  2365. ! on your system.  You may need to #define OLD_NEWDB 1 to do this.]
  2366.   
  2367.   [NOTE WELL: it is CRITICAL that you remove ndbm.o from libdb.a and
  2368.   ndbm.h from the appropriate include directories if you want to get
  2369. ***************
  2370. *** 250,255 ****
  2371. --- 250,259 ----
  2372.           vprintf(3).  Note that the resulting fake implementation
  2373.           is not very elegant and may not even work on some
  2374.           architectures.
  2375. + NEEDFSYNC    Define this if your standard C library does not define
  2376. +         fsync(2).  This will try to simulate the operation using
  2377. +         fcntl(2); if that is not available it does nothing, which
  2378. +         isn't great, but at least it compiles and runs.
  2379.   HASGETUSERSHELL    Define this to 1 if you have getusershell(3) in your
  2380.           standard C library.  If this is not defined, or is defined
  2381.           to be 0, sendmail will scan the /etc/shells file (no
  2382. ***************
  2383. *** 296,306 ****
  2384.           SFS_USTAT (1) if you have the ustat(2) system call,
  2385.           SFS_4ARGS (2) if you have a four-argument statfs(2)
  2386.           system call (and the include file is <sys/statfs.h>),
  2387. !         and SFS_VFS (3), SFS_MOUNT (4), or SFS_STATFS (5) if
  2388. !         you have the two-argument statfs(2) system call, with
  2389. !         includes in <sys/vfs.h>, <sys/mount.h>, or <sys/statfs.h>
  2390. !         respectively.  The default if nothing is defined is
  2391. !         SFS_NONE.
  2392.   ERRLIST_PREDEFINED
  2393.           If set, assumes that some header file defines sys_errlist.
  2394.           This may be needed if you get type conflicts on this
  2395. --- 300,310 ----
  2396.           SFS_USTAT (1) if you have the ustat(2) system call,
  2397.           SFS_4ARGS (2) if you have a four-argument statfs(2)
  2398.           system call (and the include file is <sys/statfs.h>),
  2399. !         and SFS_VFS (3), SFS_MOUNT (4), SFS_STATFS (5) or
  2400. !         SFS_STATVFS (6) if you have the two-argument statfs(2)
  2401. !         system call, with includes in <sys/vfs.h>, <sys/mount.h>,
  2402. !         <sys/statfs.h>, or <sys/statvfs.h> respectively.  The
  2403. !         default if nothing is defined is SFS_NONE.
  2404.   ERRLIST_PREDEFINED
  2405.           If set, assumes that some header file defines sys_errlist.
  2406.           This may be needed if you get type conflicts on this
  2407. ***************
  2408. *** 341,346 ****
  2409. --- 345,354 ----
  2410.           Normally defined in the Makefile.
  2411.   NEWDB        Include support for Berkeley "db" package (hash & btree)
  2412.           for aliases and maps.  Normally defined in the Makefile.
  2413. + OLD_NEWDB    If non-zero, the version of NEWDB you have is the old
  2414. +         one that does not include the "fd" call.  This call was
  2415. +         added in version 1.5 of the Berkeley DB code.  If you
  2416. +         use -DOLD_NEWDB=0 it forces you to use the new interface.
  2417.   NIS        Define this to get NIS (YP) support for aliases and maps.
  2418.           Normally defined in the Makefile.
  2419.   USERDB        Include support for the User Information Database.  Implied
  2420. ***************
  2421. *** 575,581 ****
  2422.       other system files, such as /etc/passwd, unless you use the
  2423.       new db format throughout your system.  You should normally just
  2424.       use the version of db supplied in your release.  You may need
  2425. !     to use -DOLD_NEWDB to make this work -- this turns off some
  2426.       new interface calls (for file locking) that are not in older
  2427.       versions of db.  You'll get compile errors if you need this
  2428.       flag and don't have it set.
  2429. --- 583,589 ----
  2430.       other system files, such as /etc/passwd, unless you use the
  2431.       new db format throughout your system.  You should normally just
  2432.       use the version of db supplied in your release.  You may need
  2433. !     to use -DOLD_NEWDB=1 to make this work -- this turns off some
  2434.       new interface calls (for file locking) that are not in older
  2435.       versions of db.  You'll get compile errors if you need this
  2436.       flag and don't have it set.
  2437. ***************
  2438. *** 861,864 ****
  2439.   
  2440.   Eric Allman
  2441.   
  2442. ! (Version 8.58, last update 3/13/94 09:38:06)
  2443. --- 869,872 ----
  2444.   
  2445.   Eric Allman
  2446.   
  2447. ! (Version 8.61, last update 4/17/94 07:05:32)
  2448. *** src/alias.c.OLD    Mon Feb 28 10:04:58 1994
  2449. --- src/alias.c    Thu Apr 14 09:42:54 1994
  2450. ***************
  2451. *** 36,42 ****
  2452.   # include <pwd.h>
  2453.   
  2454.   #ifndef lint
  2455. ! static char sccsid[] = "@(#)alias.c    8.24 (Berkeley) 2/28/94";
  2456.   #endif /* not lint */
  2457.   
  2458.   
  2459. --- 36,42 ----
  2460.   # include <pwd.h>
  2461.   
  2462.   #ifndef lint
  2463. ! static char sccsid[] = "@(#)alias.c    8.25 (Berkeley) 4/14/94";
  2464.   #endif /* not lint */
  2465.   
  2466.   
  2467. ***************
  2468. *** 144,154 ****
  2469.       if (!bitnset(M_USR_UPPER, a->q_mailer->m_flags))
  2470.           makelower(obuf);
  2471.       owner = aliaslookup(obuf, e);
  2472. !     if (owner != NULL)
  2473.       {
  2474. !         if (strpbrk(owner, ",:/|\"") != NULL)
  2475. !             owner = obuf;
  2476. !         a->q_owner = newstr(owner);
  2477.       }
  2478.   }
  2479.    /*
  2480. --- 144,163 ----
  2481.       if (!bitnset(M_USR_UPPER, a->q_mailer->m_flags))
  2482.           makelower(obuf);
  2483.       owner = aliaslookup(obuf, e);
  2484. !     if (owner == NULL)
  2485. !         return;
  2486. !     /* reflect owner into envelope sender */
  2487. !     if (strpbrk(owner, ",:/|\"") != NULL)
  2488. !         owner = obuf;
  2489. !     a->q_owner = newstr(owner);
  2490. !     /* announce delivery to this alias; NORECEIPT bit set later */
  2491. !     if (e->e_xfp != NULL)
  2492.       {
  2493. !         fprintf(e->e_xfp, "Message delivered to mailing list %s\n",
  2494. !             a->q_paddr);
  2495. !         e->e_flags |= EF_SENDRECEIPT;
  2496.       }
  2497.   }
  2498.    /*
  2499. *** src/collect.c.OLD    Mon Jan 31 17:01:17 1994
  2500. --- src/collect.c    Mon Apr 18 15:17:16 1994
  2501. ***************
  2502. *** 33,39 ****
  2503.    */
  2504.   
  2505.   #ifndef lint
  2506. ! static char sccsid[] = "@(#)collect.c    8.9 (Berkeley) 1/31/94";
  2507.   #endif /* not lint */
  2508.   
  2509.   # include <errno.h>
  2510. --- 33,39 ----
  2511.    */
  2512.   
  2513.   #ifndef lint
  2514. ! static char sccsid[] = "@(#)collect.c    8.14 (Berkeley) 4/18/94";
  2515.   #endif /* not lint */
  2516.   
  2517.   # include <errno.h>
  2518. ***************
  2519. *** 63,68 ****
  2520. --- 63,71 ----
  2521.   **        The from person may be set.
  2522.   */
  2523.   
  2524. + char    *CollectErrorMessage;
  2525. + bool    CollectErrno;
  2526.   collect(smtpmode, requeueflag, e)
  2527.       bool smtpmode;
  2528.       bool requeueflag;
  2529. ***************
  2530. *** 76,81 ****
  2531. --- 79,87 ----
  2532.       extern char *hvalue();
  2533.       extern bool isheader(), flusheol();
  2534.   
  2535. +     CollectErrorMessage = NULL;
  2536. +     CollectErrno = 0;
  2537.       /*
  2538.       **  Create the temp file name and create the file.
  2539.       */
  2540. ***************
  2541. *** 82,88 ****
  2542.   
  2543.       e->e_df = queuename(e, 'd');
  2544.       e->e_df = newstr(e->e_df);
  2545. !     if ((tf = dfopen(e->e_df, O_WRONLY|O_CREAT, FileMode)) == NULL)
  2546.       {
  2547.           syserr("Cannot create %s", e->e_df);
  2548.           NoReturn = TRUE;
  2549. --- 88,94 ----
  2550.   
  2551.       e->e_df = queuename(e, 'd');
  2552.       e->e_df = newstr(e->e_df);
  2553. !     if ((tf = dfopen(e->e_df, O_WRONLY|O_CREAT|O_TRUNC, FileMode)) == NULL)
  2554.       {
  2555.           syserr("Cannot create %s", e->e_df);
  2556.           NoReturn = TRUE;
  2557. ***************
  2558. *** 96,101 ****
  2559. --- 102,110 ----
  2560.       if (smtpmode)
  2561.           message("354 Enter mail, end with \".\" on a line by itself");
  2562.   
  2563. +     /* set global timer to monitor progress */
  2564. +     sfgetset(TimeOuts.to_datablock);
  2565.       /*
  2566.       **  Try to read a UNIX-style From line
  2567.       */
  2568. ***************
  2569. *** 287,303 ****
  2570.           inputerr = TRUE;
  2571.       }
  2572.   
  2573.       if (fflush(tf) != 0)
  2574.           tferror(tf, e);
  2575.       if (fsync(fileno(tf)) < 0 || fclose(tf) < 0)
  2576.       {
  2577. !         syserr("cannot sync message data to disk (%s)", e->e_df);
  2578.           finis();
  2579.       }
  2580.   
  2581. !     /* An EOF when running SMTP is an error */
  2582. !     if (inputerr && (OpMode == MD_SMTP || OpMode == MD_DAEMON))
  2583.       {
  2584.           char *host;
  2585.           char *problem;
  2586.   
  2587. --- 296,325 ----
  2588.           inputerr = TRUE;
  2589.       }
  2590.   
  2591. +     /* reset global timer */
  2592. +     sfgetset((time_t) 0);
  2593.       if (fflush(tf) != 0)
  2594.           tferror(tf, e);
  2595.       if (fsync(fileno(tf)) < 0 || fclose(tf) < 0)
  2596.       {
  2597. !         tferror(tf, e);
  2598.           finis();
  2599.       }
  2600.   
  2601. !     if (CollectErrorMessage != NULL && Errors <= 0)
  2602.       {
  2603. +         if (CollectErrno != 0)
  2604. +         {
  2605. +             errno = CollectErrno;
  2606. +             syserr(CollectErrorMessage, e->e_df);
  2607. +             finis();
  2608. +         }
  2609. +         usrerr(CollectErrorMessage);
  2610. +     }
  2611. +     else if (inputerr && (OpMode == MD_SMTP || OpMode == MD_DAEMON))
  2612. +     {
  2613. +         /* An EOF when running SMTP is an error */
  2614.           char *host;
  2615.           char *problem;
  2616.   
  2617. ***************
  2618. *** 314,321 ****
  2619.   # ifdef LOG
  2620.           if (LogLevel > 0 && feof(InChannel))
  2621.               syslog(LOG_NOTICE,
  2622. !                 "collect: %s on connection from %s, sender=%s: %m\n",
  2623. !                 problem, host, e->e_from.q_paddr);
  2624.   # endif
  2625.           if (feof(InChannel))
  2626.               usrerr("451 collect: %s on connection from %s, from=%s",
  2627. --- 336,343 ----
  2628.   # ifdef LOG
  2629.           if (LogLevel > 0 && feof(InChannel))
  2630.               syslog(LOG_NOTICE,
  2631. !                 "collect: %s on connection from %s, sender=%s: %s\n",
  2632. !                 problem, host, e->e_from.q_paddr, errstring(errno));
  2633.   # endif
  2634.           if (feof(InChannel))
  2635.               usrerr("451 collect: %s on connection from %s, from=%s",
  2636. ***************
  2637. *** 401,414 ****
  2638.       FILE *fp;
  2639.   {
  2640.       register char *p = buf;
  2641. -     bool printmsg = TRUE;
  2642.       char junkbuf[MAXLINE];
  2643.   
  2644.       while (strchr(p, '\n') == NULL)
  2645.       {
  2646. !         if (printmsg)
  2647. !             usrerr("553 header line too long");
  2648. !         printmsg = FALSE;
  2649.           if (sfgets(junkbuf, MAXLINE, fp, TimeOuts.to_datablock,
  2650.                   "long line flush") == NULL)
  2651.               return (FALSE);
  2652. --- 423,434 ----
  2653.       FILE *fp;
  2654.   {
  2655.       register char *p = buf;
  2656.       char junkbuf[MAXLINE];
  2657.   
  2658.       while (strchr(p, '\n') == NULL)
  2659.       {
  2660. !         CollectErrorMessage = "553 header line too long";
  2661. !         CollectErrno = 0;
  2662.           if (sfgets(junkbuf, MAXLINE, fp, TimeOuts.to_datablock,
  2663.                   "long line flush") == NULL)
  2664.               return (FALSE);
  2665. ***************
  2666. *** 435,448 ****
  2667.       FILE *tf;
  2668.       register ENVELOPE *e;
  2669.   {
  2670.       if (errno == ENOSPC)
  2671.       {
  2672.           (void) freopen(e->e_df, "w", tf);
  2673. !         fputs("\nMAIL DELETED BECAUSE OF LACK OF DISK SPACE\n\n", tf);
  2674. !         usrerr("452 Out of disk space for temp file");
  2675.       }
  2676.       else
  2677. !         syserr("collect: Cannot write %s", e->e_df);
  2678.       (void) freopen("/dev/null", "w", tf);
  2679.   }
  2680.    /*
  2681. --- 455,497 ----
  2682.       FILE *tf;
  2683.       register ENVELOPE *e;
  2684.   {
  2685. +     CollectErrno = errno;
  2686.       if (errno == ENOSPC)
  2687.       {
  2688. +         struct stat st;
  2689. +         long avail;
  2690. +         long bsize;
  2691. +         NoReturn = TRUE;
  2692. +         if (fstat(fileno(tf), &st) < 0)
  2693. +             st.st_size = 0;
  2694.           (void) freopen(e->e_df, "w", tf);
  2695. !         if (st.st_size <= 0)
  2696. !             fprintf(tf, "\n*** Mail could not be accepted");
  2697. !         else if (sizeof st.st_size > sizeof (long))
  2698. !             fprintf(tf, "\n*** Mail of at least %qd bytes could not be accepted\n",
  2699. !                 st.st_size);
  2700. !         else
  2701. !             fprintf(tf, "\n*** Mail of at least %ld bytes could not be accepted\n",
  2702. !                 st.st_size);
  2703. !         fprintf(tf, "*** at %s due to lack of disk space for temp file.\n",
  2704. !             MyHostName);
  2705. !         avail = freespace(QueueDir, &bsize);
  2706. !         if (avail > 0)
  2707. !         {
  2708. !             if (bsize > 1024)
  2709. !                 avail *= bsize / 1024;
  2710. !             else if (bsize < 1024)
  2711. !                 avail /= 1024 / bsize;
  2712. !             fprintf(tf, "*** Currently, %ld kilobytes are available for mail temp files.\n",
  2713. !                 avail);
  2714. !         }
  2715. !         CollectErrorMessage = "452 Out of disk space for temp file";
  2716.       }
  2717.       else
  2718. !     {
  2719. !         CollectErrorMessage = "cannot write message body to disk (%s)";
  2720. !     }
  2721.       (void) freopen("/dev/null", "w", tf);
  2722.   }
  2723.    /*
  2724. *** src/conf.c.OLD    Thu Apr  7 18:28:23 1994
  2725. --- src/conf.c    Mon Apr 18 15:30:12 1994
  2726. ***************
  2727. *** 33,39 ****
  2728.    */
  2729.   
  2730.   #ifndef lint
  2731. ! static char sccsid[] = "@(#)conf.c    8.82 (Berkeley) 3/6/94";
  2732.   #endif /* not lint */
  2733.   
  2734.   # include "sendmail.h"
  2735. --- 33,39 ----
  2736.    */
  2737.   
  2738.   #ifndef lint
  2739. ! static char sccsid[] = "@(#)conf.c    8.89 (Berkeley) 4/18/94";
  2740.   #endif /* not lint */
  2741.   
  2742.   # include "sendmail.h"
  2743. ***************
  2744. *** 147,152 ****
  2745. --- 147,153 ----
  2746.       "restrictmailq",    PRIV_RESTRICTMAILQ,
  2747.       "restrictqrun",        PRIV_RESTRICTQRUN,
  2748.       "authwarnings",        PRIV_AUTHWARNINGS,
  2749. +     "noreceipts",        PRIV_NORECEIPTS,
  2750.       "goaway",        PRIV_GOAWAY,
  2751.       NULL,            0,
  2752.   };
  2753. ***************
  2754. *** 668,684 ****
  2755.   #  define FSHIFT    5
  2756.   # endif
  2757.   
  2758. ! # if defined(__alpha)
  2759.   #  define FSHIFT    10
  2760.   # endif
  2761.   
  2762. ! # if (LA_TYPE == LA_INT) || (LA_TYPE == LA_SHORT)
  2763. ! #  define FSHIFT    8
  2764. ! # endif
  2765.   #endif
  2766.   
  2767. ! #if ((LA_TYPE == LA_INT) || (LA_TYPE == LA_SHORT)) && !defined(FSCALE)
  2768. ! #  define FSCALE    (1 << FSHIFT)
  2769.   #endif
  2770.   
  2771.   getla()
  2772. --- 669,685 ----
  2773.   #  define FSHIFT    5
  2774.   # endif
  2775.   
  2776. ! # if defined(__alpha) || defined(IRIX)
  2777.   #  define FSHIFT    10
  2778.   # endif
  2779. + #endif
  2780.   
  2781. ! #ifndef FSHIFT
  2782. ! # define FSHIFT        8
  2783.   #endif
  2784.   
  2785. ! #ifndef FSCALE
  2786. ! # define FSCALE        (1 << FSHIFT)
  2787.   #endif
  2788.   
  2789.   getla()
  2790. ***************
  2791. *** 721,726 ****
  2792. --- 722,730 ----
  2793.                       _PATH_UNIX, LA_AVENRUN);
  2794.               return (-1);
  2795.           }
  2796. + #ifdef IRIX
  2797. +         Nl[X_AVENRUN].n_value &= 0x7fffffff;
  2798. + #endif
  2799.       }
  2800.       if (tTd(3, 20))
  2801.           printf("getla: symbol address = %#x\n", Nl[X_AVENRUN].n_value);
  2802. ***************
  2803. *** 1115,1122 ****
  2804. --- 1119,1128 ----
  2805.       {
  2806.           if (count++ > 1000)
  2807.           {
  2808. + #ifdef LOG
  2809.               syslog(LOG_ALERT, "reapchild: waitpid loop: pid=%d, status=%x",
  2810.                   pid, status);
  2811. + #endif
  2812.               break;
  2813.           }
  2814.       }
  2815. ***************
  2816. *** 1308,1314 ****
  2817.   #ifdef TIOCNOTTY
  2818.       int fd;
  2819.   
  2820. !     fd = open("/dev/tty", 2);
  2821.       if (fd >= 0)
  2822.       {
  2823.           (void) ioctl(fd, (int) TIOCNOTTY, (char *) 0);
  2824. --- 1314,1320 ----
  2825.   #ifdef TIOCNOTTY
  2826.       int fd;
  2827.   
  2828. !     fd = open("/dev/tty", O_RDWR, 0);
  2829.       if (fd >= 0)
  2830.       {
  2831.           (void) ioctl(fd, (int) TIOCNOTTY, (char *) 0);
  2832. ***************
  2833. *** 1324,1329 ****
  2834. --- 1330,1353 ----
  2835.   
  2836.   #endif
  2837.    /*
  2838. + **  FSYNC -- dummy fsync
  2839. + */
  2840. + #ifdef NEEDFSYNC
  2841. + fsync(fd)
  2842. +     int fd;
  2843. + {
  2844. + # ifdef O_SYNC
  2845. +     return fcntl(fd, F_SETFL, O_SYNC);
  2846. + # else
  2847. +     /* nothing we can do */
  2848. +     return 0;
  2849. + # endif
  2850. + }
  2851. + #endif
  2852. +  /*
  2853.   **  DGUX_INET_ADDR -- inet_addr for DG/UX
  2854.   **
  2855.   **    Data General DG/UX version of inet_addr returns a struct in_addr
  2856. ***************
  2857. *** 1591,1596 ****
  2858. --- 1615,1621 ----
  2859.   #define SFS_VFS        3    /* use <sys/vfs.h> implementation */
  2860.   #define SFS_MOUNT    4    /* use <sys/mount.h> implementation */
  2861.   #define SFS_STATFS    5    /* use <sys/statfs.h> implementation */
  2862. + #define SFS_STATVFS    6    /* use <sys/statvfs.h> implementation */
  2863.   
  2864.   #ifndef SFS_TYPE
  2865.   # define SFS_TYPE    SFS_NONE
  2866. ***************
  2867. *** 1608,1613 ****
  2868. --- 1633,1641 ----
  2869.   #if SFS_TYPE == SFS_MOUNT
  2870.   # include <sys/mount.h>
  2871.   #endif
  2872. + #if SFS_TYPE == SFS_STATVFS
  2873. + # include <sys/statvfs.h>
  2874. + #endif
  2875.   
  2876.   long
  2877.   freespace(dir, bsize)
  2878. ***************
  2879. *** 1626,1635 ****
  2880.   #   define f_bavail    fd_bfreen
  2881.   #   define FSBLOCKSIZE    fs.fd_bsize
  2882.   #  else
  2883.       struct statfs fs;
  2884. ! #   define FSBLOCKSIZE    fs.f_bsize
  2885. ! #   if defined(_SCO_unix_) || defined(IRIX) || defined(apollo)
  2886. ! #    define f_bavail f_bfree
  2887.   #   endif
  2888.   #  endif
  2889.   # endif
  2890. --- 1654,1668 ----
  2891.   #   define f_bavail    fd_bfreen
  2892.   #   define FSBLOCKSIZE    fs.fd_bsize
  2893.   #  else
  2894. + #   if SFS_TYPE == SFS_STATVFS
  2895. +     struct statvfs fs;
  2896. + #    define FSBLOCKSIZE    fs.f_bsize
  2897. + #   else
  2898.       struct statfs fs;
  2899. ! #    define FSBLOCKSIZE    fs.f_bsize
  2900. ! #    if defined(_SCO_unix_) || defined(IRIX) || defined(apollo)
  2901. ! #     define f_bavail f_bfree
  2902. ! #    endif
  2903.   #   endif
  2904.   #  endif
  2905.   # endif
  2906. *** src/conf.h.OLD    Fri Apr  8 09:07:43 1994
  2907. --- src/conf.h    Sun Apr 17 07:05:52 1994
  2908. ***************
  2909. *** 31,37 ****
  2910.    * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  2911.    * SUCH DAMAGE.
  2912.    *
  2913. !  *    @(#)conf.h    8.96 (Berkeley) 3/11/94
  2914.    */
  2915.   
  2916.   /*
  2917. --- 31,37 ----
  2918.    * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  2919.    * SUCH DAMAGE.
  2920.    *
  2921. !  *    @(#)conf.h    8.104 (Berkeley) 4/17/94
  2922.    */
  2923.   
  2924.   /*
  2925. ***************
  2926. *** 182,188 ****
  2927.   */
  2928.   
  2929.   # ifdef IRIX
  2930. ! # include <sys/sysmacros.h>
  2931.   # define HASSETREUID    1    /* has setreuid(2) call */
  2932.   # define HASINITGROUPS    1    /* has initgroups(3) call */
  2933.   # define HASGETUSERSHELL 0    /* does not have getusershell(3) call */
  2934. --- 182,188 ----
  2935.   */
  2936.   
  2937.   # ifdef IRIX
  2938. ! # define SYSTEM5    1    /* this is a System-V derived system */
  2939.   # define HASSETREUID    1    /* has setreuid(2) call */
  2940.   # define HASINITGROUPS    1    /* has initgroups(3) call */
  2941.   # define HASGETUSERSHELL 0    /* does not have getusershell(3) call */
  2942. ***************
  2943. *** 191,196 ****
  2944. --- 191,197 ----
  2945.   # define setpgid    BSDsetpgrp
  2946.   # define GIDSET_T    gid_t
  2947.   # define SFS_TYPE    SFS_4ARGS    /* four argument statfs() call */
  2948. + # define LA_TYPE    LA_INT
  2949.   # endif
  2950.   
  2951.   
  2952. ***************
  2953. *** 255,260 ****
  2954. --- 256,266 ----
  2955.   typedef int        pid_t;
  2956.   extern char        *getenv();
  2957.   
  2958. + #  else
  2959. +             /* 4.1.x specifics */
  2960. + #   define HASSETSID    1    /* has Posix setsid(2) call */
  2961. + #   define HASSETVBUF    1    /* we have setvbuf(3) in libc */
  2962.   #  endif
  2963.   # endif
  2964.   #endif
  2965. ***************
  2966. *** 394,410 ****
  2967.   #ifdef __bsdi__
  2968.   # define HASUNSETENV    1    /* has the unsetenv(3) call */
  2969.   # define HASSETSID    1    /* has the setsid(2) POSIX syscall */
  2970. - # define SFS_TYPE    SFS_MOUNT    /* use <sys/mount.h> statfs() impl */
  2971. - # if defined(_BSDI_VERSION) && _BSDI_VERSION >= 199312
  2972. - #  define HASSETPROCTITLE 1    /* setproctitle is in libc */
  2973. - # else
  2974. - #  define SETPROCTITLE    1
  2975. - # endif
  2976.   # include <sys/cdefs.h>
  2977.   # define ERRLIST_PREDEFINED    /* don't declare sys_errlist */
  2978.   # ifndef LA_TYPE
  2979.   #  define LA_TYPE    LA_SUBR
  2980.   # endif
  2981.   #endif
  2982.   
  2983.   
  2984. --- 400,421 ----
  2985.   #ifdef __bsdi__
  2986.   # define HASUNSETENV    1    /* has the unsetenv(3) call */
  2987.   # define HASSETSID    1    /* has the setsid(2) POSIX syscall */
  2988.   # include <sys/cdefs.h>
  2989.   # define ERRLIST_PREDEFINED    /* don't declare sys_errlist */
  2990. + # define SFS_TYPE    SFS_MOUNT    /* use <sys/mount.h> statfs() impl */
  2991.   # ifndef LA_TYPE
  2992.   #  define LA_TYPE    LA_SUBR
  2993.   # endif
  2994. + # if defined(_BSDI_VERSION) && _BSDI_VERSION >= 199312
  2995. +             /* version 1.1 or later */
  2996. + #  define HASSETPROCTITLE 1    /* setproctitle is in libc */
  2997. + #  undef SETPROCTITLE        /* so don't redefine it in conf.c */
  2998. + # else
  2999. +             /* version 1.0 or earlier */
  3000. + #  ifndef OLD_NEWDB
  3001. + #   define OLD_NEWDB    1    /* old version of newdb library */
  3002. + #  endif
  3003. + # endif
  3004.   #endif
  3005.   
  3006.   
  3007. ***************
  3008. *** 420,425 ****
  3009. --- 431,439 ----
  3010.   #if defined(__386BSD__) || defined(__FreeBSD__) || defined(__NetBSD__)
  3011.   # define HASUNSETENV    1    /* has unsetenv(3) call */
  3012.   # define HASSETSID    1    /* has the setsid(2) POSIX syscall */
  3013. + # ifdef __NetBSD__
  3014. + #  define HASUNAME    1    /* has uname(2) syscall */
  3015. + # endif
  3016.   # include <sys/cdefs.h>
  3017.   # define ERRLIST_PREDEFINED    /* don't declare sys_errlist */
  3018.   # ifndef LA_TYPE
  3019. ***************
  3020. *** 502,507 ****
  3021. --- 516,522 ----
  3022.   #ifdef _SCO_unix_4_2
  3023.   # define _SCO_unix_
  3024.   # define HASSETREUID    1    /* has setreuid(2) call */
  3025. + # define NEEDFSYNC    1    /* needs the fsync(2) call stub */
  3026.   # define _PATH_UNIX    "/unix"
  3027.   # ifndef _PATH_SENDMAILCF
  3028.   #  define _PATH_SENDMAILCF    "/usr/lib/sendmail.cf"
  3029. ***************
  3030. *** 818,825 ****
  3031. --- 833,901 ----
  3032.   #endif
  3033.   
  3034.   
  3035. + /*
  3036. + **  UnixWare
  3037. + **
  3038. + **    From Evan Champion <evanc@spatial.synapse.org>.
  3039. + */
  3040.   
  3041. + #ifdef UNIXWARE
  3042. + # define SYSTEM5        1
  3043. + # ifndef HASGETUSERSHELL
  3044. + #  define HASGETUSERSHELL 0    /* does not have getusershell(3) call */
  3045. + # endif
  3046. + # define GIDSET_T        int
  3047. + # define SLEEP_T        int
  3048. + # define SFS_TYPE        SFS_STATVFS
  3049. + # define LA_TYPE        LA_ZERO
  3050. + # undef WIFEXITED
  3051. + # undef WEXITSTATUS
  3052. + # define _PATH_UNIX        "/unix"
  3053. + # ifndef _PATH_SENDMAILCF
  3054. + #  define _PATH_SENDMAILCF    "/usr/ucblib/sendmail.cf"
  3055. + # endif
  3056. + # ifndef _PATH_SENDMAILPID
  3057. + #  define _PATH_SENDMAILPID    "/usr/ucblib/sendmail.pid"
  3058. + # endif
  3059. + # define SYSLOG_BUFSIZE    128
  3060. + #endif
  3061.   
  3062. + /*
  3063. + **  Intergraph CLIX 3.1
  3064. + **
  3065. + **    From Paul Southworth <pauls@locust.cic.net>
  3066. + */
  3067. + #ifdef CLIX
  3068. + # define SYSTEM5    1    /* looks like System V */
  3069. + # ifndef HASGETUSERSHELL
  3070. + #  define HASGETUSERSHELL 0    /* does not have getusershell(3) call */
  3071. + # endif
  3072. + # define DEV_BSIZE    512    /* device block size not defined */
  3073. + # define GIDSET_T    gid_t
  3074. + # undef LOG            /* syslog not available */
  3075. + # define NEEDFSYNC    1    /* no fsync in system library */
  3076. + # define GETSHORT    _getshort
  3077. + #endif
  3078. + /*
  3079. + **  NCR 3000 Series (SysVr4)
  3080. + **
  3081. + **    From From: Kevin Darcy <kevin@tech.mis.cfc.com>.
  3082. + */
  3083. + #ifdef NCR3000
  3084. + # define __svr4__
  3085. + # undef BSD
  3086. + # define LA_AVENRUN    "avenrun"
  3087. + #endif
  3088. +  
  3089.   /**********************************************************************
  3090.   **  End of Per-Operating System defines
  3091.   **********************************************************************/
  3092. ***************
  3093. *** 925,930 ****
  3094. --- 1001,1010 ----
  3095.   
  3096.   #ifndef HASFLOCK
  3097.   # define HASFLOCK    0    /* assume no flock(2) support */
  3098. + #endif
  3099. + #ifndef OLD_NEWDB
  3100. + # define OLD_NEWDB    0    /* assume newer version of newdb */
  3101.   #endif
  3102.   
  3103.   
  3104. *** src/daemon.c.OLD    Sun Mar 13 09:21:18 1994
  3105. --- src/daemon.c    Mon Apr 18 06:48:24 1994
  3106. ***************
  3107. *** 37,45 ****
  3108.   
  3109.   #ifndef lint
  3110.   #ifdef DAEMON
  3111. ! static char sccsid[] = "@(#)daemon.c    8.39 (Berkeley) 3/13/94 (with daemon mode)";
  3112.   #else
  3113. ! static char sccsid[] = "@(#)daemon.c    8.39 (Berkeley) 3/13/94 (without daemon mode)";
  3114.   #endif
  3115.   #endif /* not lint */
  3116.   
  3117. --- 37,45 ----
  3118.   
  3119.   #ifndef lint
  3120.   #ifdef DAEMON
  3121. ! static char sccsid[] = "@(#)daemon.c    8.48 (Berkeley) 4/18/94 (with daemon mode)";
  3122.   #else
  3123. ! static char sccsid[] = "@(#)daemon.c    8.48 (Berkeley) 4/18/94 (without daemon mode)";
  3124.   #endif
  3125.   #endif /* not lint */
  3126.   
  3127. ***************
  3128. *** 109,118 ****
  3129.   getrequests()
  3130.   {
  3131.       int t;
  3132. -     int on = 1;
  3133.       bool refusingconnections = TRUE;
  3134.       FILE *pidf;
  3135.       int socksize;
  3136.       extern void reapchild();
  3137.   
  3138.       /*
  3139. --- 109,120 ----
  3140.   getrequests()
  3141.   {
  3142.       int t;
  3143.       bool refusingconnections = TRUE;
  3144.       FILE *pidf;
  3145.       int socksize;
  3146. + #ifdef XDEBUG
  3147. +     bool j_has_dot;
  3148. + #endif
  3149.       extern void reapchild();
  3150.   
  3151.       /*
  3152. ***************
  3153. *** 145,206 ****
  3154.           printf("getrequests: port 0x%x\n", DaemonAddr.sin.sin_port);
  3155.   
  3156.       /* get a socket for the SMTP connection */
  3157. !     DaemonSocket = socket(DaemonAddr.sa.sa_family, SOCK_STREAM, 0);
  3158. !     if (DaemonSocket < 0)
  3159. !     {
  3160. !         /* probably another daemon already */
  3161. !         syserr("getrequests: can't create socket");
  3162. !       severe:
  3163. ! # ifdef LOG
  3164. !         if (LogLevel > 0)
  3165. !             syslog(LOG_ALERT, "problem creating SMTP socket");
  3166. ! # endif /* LOG */
  3167. !         finis();
  3168. !     }
  3169.   
  3170. -     /* turn on network debugging? */
  3171. -     if (tTd(15, 101))
  3172. -         (void) setsockopt(DaemonSocket, SOL_SOCKET, SO_DEBUG, (char *)&on, sizeof on);
  3173. -     (void) setsockopt(DaemonSocket, SOL_SOCKET, SO_REUSEADDR, (char *)&on, sizeof on);
  3174. -     (void) setsockopt(DaemonSocket, SOL_SOCKET, SO_KEEPALIVE, (char *)&on, sizeof on);
  3175. - #ifdef SO_RCVBUF
  3176. -     if (TcpRcvBufferSize > 0)
  3177. -     {
  3178. -         if (setsockopt(DaemonSocket, SOL_SOCKET, SO_RCVBUF,
  3179. -                    (char *) &TcpRcvBufferSize,
  3180. -                    sizeof(TcpRcvBufferSize)) < 0)
  3181. -             syserr("getrequests: setsockopt(SO_RCVBUF)");
  3182. -     }
  3183. - #endif
  3184. -     switch (DaemonAddr.sa.sa_family)
  3185. -     {
  3186. - # ifdef NETINET
  3187. -       case AF_INET:
  3188. -         socksize = sizeof DaemonAddr.sin;
  3189. -         break;
  3190. - # endif
  3191. - # ifdef NETISO
  3192. -       case AF_ISO:
  3193. -         socksize = sizeof DaemonAddr.siso;
  3194. -         break;
  3195. - # endif
  3196. -       default:
  3197. -         socksize = sizeof DaemonAddr;
  3198. -         break;
  3199. -     }
  3200. -     if (bind(DaemonSocket, &DaemonAddr.sa, socksize) < 0)
  3201. -     {
  3202. -         syserr("getrequests: cannot bind");
  3203. -         (void) close(DaemonSocket);
  3204. -         goto severe;
  3205. -     }
  3206.       (void) setsignal(SIGCHLD, reapchild);
  3207.   
  3208.       /* write the pid to the log file for posterity */
  3209. --- 147,154 ----
  3210.           printf("getrequests: port 0x%x\n", DaemonAddr.sin.sin_port);
  3211.   
  3212.       /* get a socket for the SMTP connection */
  3213. !     socksize = opendaemonsocket(TRUE);
  3214.   
  3215.       (void) setsignal(SIGCHLD, reapchild);
  3216.   
  3217.       /* write the pid to the log file for posterity */
  3218. ***************
  3219. *** 219,225 ****
  3220. --- 167,181 ----
  3221.           fclose(pidf);
  3222.       }
  3223.   
  3224. + #ifdef XDEBUG
  3225. +     {
  3226. +         char jbuf[MAXHOSTNAMELEN];
  3227.   
  3228. +         expand("\201j", jbuf, &jbuf[sizeof jbuf - 1], CurEnv);
  3229. +         j_has_dot = strchr(jbuf, '.') != NULL;
  3230. +     }
  3231. + #endif
  3232.       if (tTd(15, 1))
  3233.           printf("getrequests: %d\n", DaemonSocket);
  3234.   
  3235. ***************
  3236. *** 233,247 ****
  3237.           CurrentLA = getla();
  3238.           if (refuseconnections())
  3239.           {
  3240. !             if (!refusingconnections)
  3241.               {
  3242. !                 /* don't queue so peer will fail quickly */
  3243. !                 (void) listen(DaemonSocket, 0);
  3244. !                 refusingconnections = TRUE;
  3245.               }
  3246.               setproctitle("rejecting connections: load average: %d",
  3247.                   CurrentLA);
  3248. !             sleep(5);
  3249.               continue;
  3250.           }
  3251.   
  3252. --- 189,204 ----
  3253.           CurrentLA = getla();
  3254.           if (refuseconnections())
  3255.           {
  3256. !             if (DaemonSocket >= 0)
  3257.               {
  3258. !                 /* close socket so peer will fail quickly */
  3259. !                 (void) close(DaemonSocket);
  3260. !                 DaemonSocket = -1;
  3261.               }
  3262. +             refusingconnections = TRUE;
  3263.               setproctitle("rejecting connections: load average: %d",
  3264.                   CurrentLA);
  3265. !             sleep(15);
  3266.               continue;
  3267.           }
  3268.   
  3269. ***************
  3270. *** 248,263 ****
  3271.           if (refusingconnections)
  3272.           {
  3273.               /* start listening again */
  3274. !             if (listen(DaemonSocket, ListenQueueSize) < 0)
  3275. !             {
  3276. !                 syserr("getrequests: cannot listen");
  3277. !                 (void) close(DaemonSocket);
  3278. !                 goto severe;
  3279. !             }
  3280.               setproctitle("accepting connections");
  3281.               refusingconnections = FALSE;
  3282.           }
  3283.   
  3284.           /* wait for a connection */
  3285.           do
  3286.           {
  3287. --- 205,238 ----
  3288.           if (refusingconnections)
  3289.           {
  3290.               /* start listening again */
  3291. !             (void) opendaemonsocket(FALSE);
  3292.               setproctitle("accepting connections");
  3293.               refusingconnections = FALSE;
  3294.           }
  3295.   
  3296. + #ifdef XDEBUG
  3297. +         /* check for disaster */
  3298. +         {
  3299. +             register STAB *s;
  3300. +             char jbuf[MAXHOSTNAMELEN];
  3301. +             expand("\201j", jbuf, &jbuf[sizeof jbuf - 1], CurEnv);
  3302. +             if ((s = stab(jbuf, ST_CLASS, ST_FIND)) == NULL ||
  3303. +                 !bitnset('w', s->s_class))
  3304. +             {
  3305. +                 dumpstate("daemon lost $j");
  3306. +                 syslog(LOG_ALERT, "daemon process doesn't have $j in $=w; see syslog");
  3307. +                 abort();
  3308. +             }
  3309. +             else if (j_has_dot && strchr(jbuf, '.') == NULL)
  3310. +             {
  3311. +                 dumpstate("daemon $j lost dot");
  3312. +                 syslog(LOG_ALERT, "daemon process $j lost dot; see syslog");
  3313. +                 abort();
  3314. +             }
  3315. +         }
  3316. + #endif
  3317.           /* wait for a connection */
  3318.           do
  3319.           {
  3320. ***************
  3321. *** 349,354 ****
  3322. --- 324,441 ----
  3323.       /*NOTREACHED*/
  3324.   }
  3325.    /*
  3326. + **  OPENDAEMONSOCKET -- open the SMTP socket
  3327. + **
  3328. + **    Deals with setting all appropriate options.  DaemonAddr must
  3329. + **    be set up in advance.
  3330. + **
  3331. + **    Parameters:
  3332. + **        firsttime -- set if this is the initial open.
  3333. + **
  3334. + **    Returns:
  3335. + **        Size in bytes of the daemon socket addr.
  3336. + **
  3337. + **    Side Effects:
  3338. + **        Leaves DaemonSocket set to the open socket.
  3339. + **        Exits if the socket cannot be created.
  3340. + */
  3341. + #define MAXOPENTRIES    10    /* maximum number of tries to open connection */
  3342. + int
  3343. + opendaemonsocket(firsttime)
  3344. +     bool firsttime;
  3345. + {
  3346. +     int on = 1;
  3347. +     int socksize;
  3348. +     int ntries = 0;
  3349. +     int saveerrno;
  3350. +     if (tTd(15, 2))
  3351. +         printf("opendaemonsocket()\n");
  3352. +     do
  3353. +     {
  3354. +         if (ntries > 0)
  3355. +             sleep(5);
  3356. +         if (firsttime || DaemonSocket < 0)
  3357. +         {
  3358. +             DaemonSocket = socket(DaemonAddr.sa.sa_family, SOCK_STREAM, 0);
  3359. +             if (DaemonSocket < 0)
  3360. +             {
  3361. +                 /* probably another daemon already */
  3362. +                 saveerrno = errno;
  3363. +                 syserr("opendaemonsocket: can't create server SMTP socket");
  3364. +               severe:
  3365. + # ifdef LOG
  3366. +                 if (LogLevel > 0)
  3367. +                     syslog(LOG_ALERT, "problem creating SMTP socket");
  3368. + # endif /* LOG */
  3369. +                 DaemonSocket = -1;
  3370. +                 continue;
  3371. +             }
  3372. +             /* turn on network debugging? */
  3373. +             if (tTd(15, 101))
  3374. +                 (void) setsockopt(DaemonSocket, SOL_SOCKET,
  3375. +                           SO_DEBUG, (char *)&on,
  3376. +                           sizeof on);
  3377. +             (void) setsockopt(DaemonSocket, SOL_SOCKET,
  3378. +                       SO_REUSEADDR, (char *)&on, sizeof on);
  3379. +             (void) setsockopt(DaemonSocket, SOL_SOCKET,
  3380. +                       SO_KEEPALIVE, (char *)&on, sizeof on);
  3381. + #ifdef SO_RCVBUF
  3382. +             if (TcpRcvBufferSize > 0)
  3383. +             {
  3384. +                 if (setsockopt(DaemonSocket, SOL_SOCKET,
  3385. +                            SO_RCVBUF,
  3386. +                            (char *) &TcpRcvBufferSize,
  3387. +                            sizeof(TcpRcvBufferSize)) < 0)
  3388. +                     syserr("getrequests: setsockopt(SO_RCVBUF)");
  3389. +             }
  3390. + #endif
  3391. +             switch (DaemonAddr.sa.sa_family)
  3392. +             {
  3393. + # ifdef NETINET
  3394. +               case AF_INET:
  3395. +                 socksize = sizeof DaemonAddr.sin;
  3396. +                 break;
  3397. + # endif
  3398. + # ifdef NETISO
  3399. +               case AF_ISO:
  3400. +                 socksize = sizeof DaemonAddr.siso;
  3401. +                 break;
  3402. + # endif
  3403. +               default:
  3404. +                 socksize = sizeof DaemonAddr;
  3405. +                 break;
  3406. +             }
  3407. +             if (bind(DaemonSocket, &DaemonAddr.sa, socksize) < 0)
  3408. +             {
  3409. +                 saveerrno = errno;
  3410. +                 syserr("getrequests: cannot bind");
  3411. +                 (void) close(DaemonSocket);
  3412. +                 goto severe;
  3413. +             }
  3414. +         }
  3415. +         if (!firsttime && listen(DaemonSocket, ListenQueueSize) < 0)
  3416. +         {
  3417. +             saveerrno = errno;
  3418. +             syserr("getrequests: cannot listen");
  3419. +             (void) close(DaemonSocket);
  3420. +             goto severe;
  3421. +         }
  3422. +         return socksize;
  3423. +     } while (ntries++ < MAXOPENTRIES && transienterror(saveerrno));
  3424. +     finis();
  3425. + }
  3426. +  /*
  3427.   **  CLRDAEMON -- reset the daemon connection
  3428.   **
  3429.   **    Parameters:
  3430. ***************
  3431. *** 740,746 ****
  3432.           if (tTd(16, 101))
  3433.           {
  3434.               int on = 1;
  3435. !             (void) setsockopt(DaemonSocket, SOL_SOCKET, SO_DEBUG,
  3436.                         (char *)&on, sizeof on);
  3437.           }
  3438.           if (CurEnv->e_xfp != NULL)
  3439. --- 827,833 ----
  3440.           if (tTd(16, 101))
  3441.           {
  3442.               int on = 1;
  3443. !             (void) setsockopt(s, SOL_SOCKET, SO_DEBUG,
  3444.                         (char *)&on, sizeof on);
  3445.           }
  3446.           if (CurEnv->e_xfp != NULL)
  3447. ***************
  3448. *** 828,856 ****
  3449.           (void) strcpy(hostbuf, "localhost");
  3450.       }
  3451.       hp = gethostbyname(hostbuf);
  3452. !     if (hp != NULL)
  3453.       {
  3454. !         (void) strncpy(hostbuf, hp->h_name, size - 1);
  3455. !         hostbuf[size - 1] = '\0';
  3456.   
  3457. !         if (hp->h_addrtype == AF_INET && hp->h_length == 4)
  3458.           {
  3459. !             register int i;
  3460.   
  3461. !             for (i = 0; hp->h_addr_list[i] != NULL; i++)
  3462. !             {
  3463. !                 char ipbuf[100];
  3464.   
  3465. !                 sprintf(ipbuf, "[%s]",
  3466. !                     inet_ntoa(*((struct in_addr *) hp->h_addr_list[i])));
  3467. !                 setclass('w', ipbuf);
  3468. !             }
  3469. !         }
  3470.   
  3471. !         return (hp->h_aliases);
  3472.       }
  3473. !     else
  3474. !         return (NULL);
  3475.   }
  3476.    /*
  3477.   **  GETAUTHINFO -- get the real host name asociated with a file descriptor
  3478. --- 915,962 ----
  3479.           (void) strcpy(hostbuf, "localhost");
  3480.       }
  3481.       hp = gethostbyname(hostbuf);
  3482. !     if (hp == NULL)
  3483.       {
  3484. !         syserr("!My host name (%s) does not seem to exist!", hostbuf);
  3485. !     }
  3486. !     (void) strncpy(hostbuf, hp->h_name, size - 1);
  3487. !     hostbuf[size - 1] = '\0';
  3488.   
  3489. ! #if NAMED_BIND
  3490. !     /* if still no dot, try DNS directly (i.e., avoid NIS problems) */
  3491. !     if (strchr(hostbuf, '.') == NULL)
  3492. !     {
  3493. !         extern bool getcanonname();
  3494. !         extern int h_errno;
  3495. !         /* try twice in case name server not yet started up */
  3496. !         if (!getcanonname(hostbuf, size, TRUE) &&
  3497. !             UseNameServer &&
  3498. !             (h_errno != TRY_AGAIN ||
  3499. !              (sleep(30), !getcanonname(hostbuf, size, TRUE))))
  3500.           {
  3501. !             errno = h_errno + E_DNSBASE;
  3502. !             syserr("!My host name (%s) not known to DNS",
  3503. !                 hostbuf);
  3504. !         }
  3505. !     }
  3506. ! #endif
  3507.   
  3508. !     if (hp->h_addrtype == AF_INET && hp->h_length == 4)
  3509. !     {
  3510. !         register int i;
  3511.   
  3512. !         for (i = 0; hp->h_addr_list[i] != NULL; i++)
  3513. !         {
  3514. !             char ipbuf[100];
  3515.   
  3516. !             sprintf(ipbuf, "[%s]",
  3517. !                 inet_ntoa(*((struct in_addr *) hp->h_addr_list[i])));
  3518. !             setclass('w', ipbuf);
  3519. !         }
  3520.       }
  3521. !     return (hp->h_aliases);
  3522.   }
  3523.    /*
  3524.   **  GETAUTHINFO -- get the real host name asociated with a file descriptor
  3525. ***************
  3526. *** 880,886 ****
  3527.   getauthinfo(fd)
  3528.       int fd;
  3529.   {
  3530. -     SOCKADDR fa;
  3531.       int falen;
  3532.       register char *p;
  3533.   #if IDENTPROTO
  3534. --- 986,991 ----
  3535. ***************
  3536. *** 895,903 ****
  3537.       extern char *hostnamebyanyaddr();
  3538.       extern char RealUserName[];            /* main.c */
  3539.   
  3540. !     falen = sizeof fa;
  3541. !     if (getpeername(fd, &fa.sa, &falen) < 0 || falen <= 0 ||
  3542. !         fa.sa.sa_family == 0)
  3543.       {
  3544.           (void) sprintf(hbuf, "%s@localhost", RealUserName);
  3545.           if (tTd(9, 1))
  3546. --- 1000,1008 ----
  3547.       extern char *hostnamebyanyaddr();
  3548.       extern char RealUserName[];            /* main.c */
  3549.   
  3550. !     falen = sizeof RealHostAddr;
  3551. !     if (getpeername(fd, &RealHostAddr.sa, &falen) < 0 || falen <= 0 ||
  3552. !         RealHostAddr.sa.sa_family == 0)
  3553.       {
  3554.           (void) sprintf(hbuf, "%s@localhost", RealUserName);
  3555.           if (tTd(9, 1))
  3556. ***************
  3557. *** 905,916 ****
  3558.           return hbuf;
  3559.       }
  3560.   
  3561.   #if IDENTPROTO
  3562.       if (TimeOuts.to_ident == 0)
  3563.           goto noident;
  3564.   
  3565.       lalen = sizeof la;
  3566. !     if (fa.sa.sa_family != AF_INET ||
  3567.           getsockname(fd, &la.sa, &lalen) < 0 || lalen <= 0 ||
  3568.           la.sa.sa_family != AF_INET)
  3569.       {
  3570. --- 1010,1027 ----
  3571.           return hbuf;
  3572.       }
  3573.   
  3574. +     if (RealHostName == NULL)
  3575. +     {
  3576. +         /* translate that to a host name */
  3577. +         RealHostName = newstr(hostnamebyanyaddr(&RealHostAddr));
  3578. +     }
  3579.   #if IDENTPROTO
  3580.       if (TimeOuts.to_ident == 0)
  3581.           goto noident;
  3582.   
  3583.       lalen = sizeof la;
  3584. !     if (RealHostAddr.sa.sa_family != AF_INET ||
  3585.           getsockname(fd, &la.sa, &lalen) < 0 || lalen <= 0 ||
  3586.           la.sa.sa_family != AF_INET)
  3587.       {
  3588. ***************
  3589. *** 920,926 ****
  3590.   
  3591.       /* create ident query */
  3592.       (void) sprintf(hbuf, "%d,%d\r\n",
  3593. !         ntohs(fa.sin.sin_port), ntohs(la.sin.sin_port));
  3594.   
  3595.       /* create local address */
  3596.       la.sin.sin_port = 0;
  3597. --- 1031,1037 ----
  3598.   
  3599.       /* create ident query */
  3600.       (void) sprintf(hbuf, "%d,%d\r\n",
  3601. !         ntohs(RealHostAddr.sin.sin_port), ntohs(la.sin.sin_port));
  3602.   
  3603.       /* create local address */
  3604.       la.sin.sin_port = 0;
  3605. ***************
  3606. *** 928,936 ****
  3607.       /* create foreign address */
  3608.       sp = getservbyname("auth", "tcp");
  3609.       if (sp != NULL)
  3610. !         fa.sin.sin_port = sp->s_port;
  3611.       else
  3612. !         fa.sin.sin_port = htons(113);
  3613.   
  3614.       s = -1;
  3615.       if (setjmp(CtxAuthTimeout) != 0)
  3616. --- 1039,1047 ----
  3617.       /* create foreign address */
  3618.       sp = getservbyname("auth", "tcp");
  3619.       if (sp != NULL)
  3620. !         RealHostAddr.sin.sin_port = sp->s_port;
  3621.       else
  3622. !         RealHostAddr.sin.sin_port = htons(113);
  3623.   
  3624.       s = -1;
  3625.       if (setjmp(CtxAuthTimeout) != 0)
  3626. ***************
  3627. *** 951,957 ****
  3628.           goto noident;
  3629.       }
  3630.       if (bind(s, &la.sa, sizeof la.sin) < 0 ||
  3631. !         connect(s, &fa.sa, sizeof fa.sin) < 0)
  3632.       {
  3633.           goto closeident;
  3634.       }
  3635. --- 1062,1068 ----
  3636.           goto noident;
  3637.       }
  3638.       if (bind(s, &la.sa, sizeof la.sin) < 0 ||
  3639. !         connect(s, &RealHostAddr.sa, sizeof RealHostAddr.sin) < 0)
  3640.       {
  3641.           goto closeident;
  3642.       }
  3643. *** src/deliver.c.OLD    Fri Apr  8 08:36:53 1994
  3644. --- src/deliver.c    Mon Apr 18 15:30:37 1994
  3645. ***************
  3646. *** 33,39 ****
  3647.    */
  3648.   
  3649.   #ifndef lint
  3650. ! static char sccsid[] = "@(#)deliver.c    8.78 (Berkeley) 3/11/94";
  3651.   #endif /* not lint */
  3652.   
  3653.   #include "sendmail.h"
  3654. --- 33,39 ----
  3655.    */
  3656.   
  3657.   #ifndef lint
  3658. ! static char sccsid[] = "@(#)deliver.c    8.82 (Berkeley) 4/18/94";
  3659.   #endif /* not lint */
  3660.   
  3661.   #include "sendmail.h"
  3662. ***************
  3663. *** 232,238 ****
  3664.               ee->e_header = copyheader(e->e_header);
  3665.               ee->e_sendqueue = copyqueue(e->e_sendqueue);
  3666.               ee->e_errorqueue = copyqueue(e->e_errorqueue);
  3667. !             ee->e_flags = e->e_flags & ~(EF_INQUEUE|EF_CLRQUEUE|EF_FATALERRS);
  3668.               setsender(owner, ee, NULL, TRUE);
  3669.               if (tTd(13, 5))
  3670.               {
  3671. --- 232,239 ----
  3672.               ee->e_header = copyheader(e->e_header);
  3673.               ee->e_sendqueue = copyqueue(e->e_sendqueue);
  3674.               ee->e_errorqueue = copyqueue(e->e_errorqueue);
  3675. !             ee->e_flags = e->e_flags & ~(EF_INQUEUE|EF_CLRQUEUE|EF_FATALERRS|EF_SENDRECEIPT);
  3676. !             ee->e_flags |= EF_NORECEIPT;
  3677.               setsender(owner, ee, NULL, TRUE);
  3678.               if (tTd(13, 5))
  3679.               {
  3680. ***************
  3681. *** 289,294 ****
  3682. --- 290,296 ----
  3683.           }
  3684.           e->e_from.q_flags |= QDONTSEND;
  3685.           e->e_errormode = EM_MAIL;
  3686. +         e->e_flags |= EF_NORECEIPT;
  3687.       }
  3688.   
  3689.   # ifdef QUEUE
  3690. ***************
  3691. *** 1296,1301 ****
  3692. --- 1298,1306 ----
  3693.               }
  3694.               env[i++] = NULL;
  3695.   
  3696. +             /* run disconnected from terminal */
  3697. +             (void) setsid();
  3698.               /* try to execute the mailer */
  3699.               execve(m->m_mailer, pv, env);
  3700.               saveerrno = errno;
  3701. ***************
  3702. *** 1855,1861 ****
  3703.           (void) strcat(bp, "]");
  3704.   # endif
  3705.       }
  3706. !     else
  3707.       {
  3708.           char *p = macvalue('h', e);
  3709.   
  3710. --- 1860,1866 ----
  3711.           (void) strcat(bp, "]");
  3712.   # endif
  3713.       }
  3714. !     else if (strcmp(stat, "queued") != 0)
  3715.       {
  3716.           char *p = macvalue('h', e);
  3717.   
  3718. ***************
  3719. *** 1961,1967 ****
  3720.           (void) strcat(buf, "]");
  3721.   # endif
  3722.       }
  3723. !     else
  3724.       {
  3725.           char *p = macvalue('h', e);
  3726.   
  3727. --- 1966,1972 ----
  3728.           (void) strcat(buf, "]");
  3729.   # endif
  3730.       }
  3731. !     else if (strcmp(stat, "queued") != 0)
  3732.       {
  3733.           char *p = macvalue('h', e);
  3734.   
  3735. *** src/envelope.c.OLD    Fri Feb 25 20:33:10 1994
  3736. --- src/envelope.c    Thu Apr 14 09:40:55 1994
  3737. ***************
  3738. *** 33,39 ****
  3739.    */
  3740.   
  3741.   #ifndef lint
  3742. ! static char sccsid[] = "@(#)envelope.c    8.33 (Berkeley) 2/10/94";
  3743.   #endif /* not lint */
  3744.   
  3745.   #include "sendmail.h"
  3746. --- 33,39 ----
  3747.    */
  3748.   
  3749.   #ifndef lint
  3750. ! static char sccsid[] = "@(#)envelope.c    8.34 (Berkeley) 4/14/94";
  3751.   #endif /* not lint */
  3752.   
  3753.   #include "sendmail.h"
  3754. ***************
  3755. *** 210,216 ****
  3756.       **  Send back return receipts as requested.
  3757.       */
  3758.   
  3759. !     if (e->e_receiptto != NULL && bitset(EF_SENDRECEIPT, e->e_flags))
  3760.       {
  3761.           auto ADDRESS *rlist = NULL;
  3762.   
  3763. --- 210,217 ----
  3764.       **  Send back return receipts as requested.
  3765.       */
  3766.   
  3767. !     if (e->e_receiptto != NULL && bitset(EF_SENDRECEIPT, e->e_flags)
  3768. !         && !bitset(PRIV_NORECEIPTS, PrivacyFlags))
  3769.       {
  3770.           auto ADDRESS *rlist = NULL;
  3771.   
  3772. *** src/headers.c.OLD    Wed Mar  2 15:35:54 1994
  3773. --- src/headers.c    Thu Apr 14 09:42:52 1994
  3774. ***************
  3775. *** 33,39 ****
  3776.    */
  3777.   
  3778.   #ifndef lint
  3779. ! static char sccsid[] = "@(#)headers.c    8.30 (Berkeley) 2/25/94";
  3780.   #endif /* not lint */
  3781.   
  3782.   # include <errno.h>
  3783. --- 33,39 ----
  3784.    */
  3785.   
  3786.   #ifndef lint
  3787. ! static char sccsid[] = "@(#)headers.c    8.32 (Berkeley) 4/14/94";
  3788.   #endif /* not lint */
  3789.   
  3790.   # include <errno.h>
  3791. ***************
  3792. *** 530,535 ****
  3793. --- 530,536 ----
  3794.       register ENVELOPE *e;
  3795.       char *msgid;
  3796.   {
  3797. + # ifdef LOG
  3798.       char *name;
  3799.       register char *sbp;
  3800.       register char *p;
  3801. ***************
  3802. *** 604,609 ****
  3803. --- 605,611 ----
  3804.       }
  3805.       syslog(LOG_INFO, "%s relay=%s", sbuf, name);
  3806.   #  endif
  3807. + # endif
  3808.   }
  3809.    /*
  3810.   **  PRIENCODE -- encode external priority names into internal values.
  3811. ***************
  3812. *** 951,956 ****
  3813. --- 953,967 ----
  3814.           {
  3815.               if (tTd(34, 11))
  3816.                   printf(" (skipped (resent))\n");
  3817. +             continue;
  3818. +         }
  3819. +         /* suppress return receipts if requested */
  3820. +         if (bitset(H_RECEIPTTO, h->h_flags) &&
  3821. +             bitset(EF_NORECEIPT, e->e_flags))
  3822. +         {
  3823. +             if (tTd(34, 11))
  3824. +                 printf(" (skipped (receipt))\n");
  3825.               continue;
  3826.           }
  3827.   
  3828. *** src/main.c.OLD    Mon Mar 21 13:05:16 1994
  3829. --- src/main.c    Sun Apr 17 10:26:47 1994
  3830. ***************
  3831. *** 39,45 ****
  3832.   #endif /* not lint */
  3833.   
  3834.   #ifndef lint
  3835. ! static char sccsid[] = "@(#)main.c    8.52 (Berkeley) 3/11/94";
  3836.   #endif /* not lint */
  3837.   
  3838.   #define    _DEFINE
  3839. --- 39,45 ----
  3840.   #endif /* not lint */
  3841.   
  3842.   #ifndef lint
  3843. ! static char sccsid[] = "@(#)main.c    8.55 (Berkeley) 4/15/94";
  3844.   #endif /* not lint */
  3845.   
  3846.   #define    _DEFINE
  3847. ***************
  3848. *** 154,160 ****
  3849.       extern char *getcfname();
  3850.       extern char *optarg;
  3851.       extern char **environ;
  3852. !     extern void dumpstate();
  3853.   
  3854.       /*
  3855.       **  Check to see if we reentered.
  3856. --- 154,160 ----
  3857.       extern char *getcfname();
  3858.       extern char *optarg;
  3859.       extern char **environ;
  3860. !     extern void sigusr1();
  3861.   
  3862.       /*
  3863.       **  Check to see if we reentered.
  3864. ***************
  3865. *** 174,180 ****
  3866.   
  3867.       /* arrange to dump state on signal */
  3868.   #ifdef SIGUSR1
  3869. !     setsignal(SIGUSR1, dumpstate);
  3870.   #endif
  3871.   
  3872.       /* in 4.4BSD, the table can be huge; impose a reasonable limit */
  3873. --- 174,180 ----
  3874.   
  3875.       /* arrange to dump state on signal */
  3876.   #ifdef SIGUSR1
  3877. !     setsignal(SIGUSR1, sigusr1);
  3878.   #endif
  3879.   
  3880.       /* in 4.4BSD, the table can be huge; impose a reasonable limit */
  3881. ***************
  3882. *** 187,193 ****
  3883.       **    But also be sure that 0, 1, & 2 are open.
  3884.       */
  3885.   
  3886. !     i = open("/dev/null", O_RDWR);
  3887.       if (fstat(STDIN_FILENO, &stb) < 0 && errno != EOPNOTSUPP)
  3888.           (void) dup2(i, STDIN_FILENO);
  3889.       if (fstat(STDOUT_FILENO, &stb) < 0 && errno != EOPNOTSUPP)
  3890. --- 187,193 ----
  3891.       **    But also be sure that 0, 1, & 2 are open.
  3892.       */
  3893.   
  3894. !     i = open("/dev/null", O_RDWR, 0);
  3895.       if (fstat(STDIN_FILENO, &stb) < 0 && errno != EOPNOTSUPP)
  3896.           (void) dup2(i, STDIN_FILENO);
  3897.       if (fstat(STDOUT_FILENO, &stb) < 0 && errno != EOPNOTSUPP)
  3898. ***************
  3899. *** 205,214 ****
  3900.       }
  3901.       errno = 0;
  3902.   
  3903. ! #ifdef LOG_MAIL
  3904.       openlog("sendmail", LOG_PID, LOG_MAIL);
  3905. ! #else 
  3906.       openlog("sendmail", LOG_PID);
  3907.   #endif 
  3908.   
  3909.       /* set up the blank envelope */
  3910. --- 205,216 ----
  3911.       }
  3912.       errno = 0;
  3913.   
  3914. ! #ifdef LOG
  3915. ! # ifdef LOG_MAIL
  3916.       openlog("sendmail", LOG_PID, LOG_MAIL);
  3917. ! # else 
  3918.       openlog("sendmail", LOG_PID);
  3919. + # endif
  3920.   #endif 
  3921.   
  3922.       /* set up the blank envelope */
  3923. ***************
  3924. *** 985,991 ****
  3925. --- 987,995 ----
  3926.           if (tTd(0, 1))
  3927.               strcat(dtype, "+debugging");
  3928.   
  3929. + #ifdef LOG
  3930.           syslog(LOG_INFO, "starting daemon (%s): %s", Version, dtype + 1);
  3931. + #endif
  3932.   #ifdef XLA
  3933.           xla_create_file();
  3934.   #endif
  3935. ***************
  3936. *** 1424,1445 ****
  3937.       }
  3938.   }
  3939.    /*
  3940. ! **  DUMPSTATE -- dump state on user signal
  3941.   **
  3942.   **    For debugging.
  3943.   */
  3944.   
  3945.   void
  3946. ! dumpstate()
  3947.   {
  3948.   #ifdef LOG
  3949.       register char *j = macvalue('j', CurEnv);
  3950.       register STAB *s;
  3951.   
  3952. !     syslog(LOG_DEBUG, "--- dumping state on user signal: $j = %s ---", j);
  3953. !     s = stab(j, ST_CLASS, ST_FIND);
  3954. !     if (s == NULL || !bitnset('w', s->s_class))
  3955. !         syslog(LOG_DEBUG, "*** $j not in $=w ***");
  3956.       syslog(LOG_DEBUG, "--- open file descriptors: ---");
  3957.       printopenfds(TRUE);
  3958.       syslog(LOG_DEBUG, "--- connection cache: ---");
  3959. --- 1428,1455 ----
  3960.       }
  3961.   }
  3962.    /*
  3963. ! **  DUMPSTATE -- dump state
  3964.   **
  3965.   **    For debugging.
  3966.   */
  3967.   
  3968.   void
  3969. ! dumpstate(when)
  3970. !     char *when;
  3971.   {
  3972.   #ifdef LOG
  3973.       register char *j = macvalue('j', CurEnv);
  3974.       register STAB *s;
  3975.   
  3976. !     syslog(LOG_DEBUG, "--- dumping state on %s: $j = %s ---",
  3977. !         when,
  3978. !         j == NULL ? "<NULL>" : j);
  3979. !     if (j != NULL)
  3980. !     {
  3981. !         s = stab(j, ST_CLASS, ST_FIND);
  3982. !         if (s == NULL || !bitnset('w', s->s_class))
  3983. !             syslog(LOG_DEBUG, "*** $j not in $=w ***");
  3984. !     }
  3985.       syslog(LOG_DEBUG, "--- open file descriptors: ---");
  3986.       printopenfds(TRUE);
  3987.       syslog(LOG_DEBUG, "--- connection cache: ---");
  3988. ***************
  3989. *** 1459,1462 ****
  3990. --- 1469,1479 ----
  3991.       }
  3992.       syslog(LOG_DEBUG, "--- end of state dump ---");
  3993.   #endif
  3994. + }
  3995. + void
  3996. + sigusr1()
  3997. + {
  3998. +     dumpstate("user signal");
  3999.   }
  4000. *** src/map.c.OLD    Fri Apr  8 08:37:27 1994
  4001. --- src/map.c    Sun Apr 17 07:05:52 1994
  4002. ***************
  4003. *** 33,39 ****
  4004.    */
  4005.   
  4006.   #ifndef lint
  4007. ! static char sccsid[] = "@(#)map.c    8.22 (Berkeley) 2/18/94";
  4008.   #endif /* not lint */
  4009.   
  4010.   #include "sendmail.h"
  4011. --- 33,39 ----
  4012.    */
  4013.   
  4014.   #ifndef lint
  4015. ! static char sccsid[] = "@(#)map.c    8.25 (Berkeley) 4/17/94";
  4016.   #endif /* not lint */
  4017.   
  4018.   #include "sendmail.h"
  4019. ***************
  4020. *** 575,580 ****
  4021. --- 575,583 ----
  4022.   ndbm_map_close(map)
  4023.       register MAP  *map;
  4024.   {
  4025. +     if (tTd(38, 9))
  4026. +         printf("ndbm_map_close(%s, %x)\n", map->map_file, map->map_mflags);
  4027.       if (bitset(MF_WRITABLE, map->map_mflags))
  4028.       {
  4029.   #ifdef NIS
  4030. ***************
  4031. *** 640,646 ****
  4032.           omode |= O_CREAT|O_TRUNC;
  4033.   #if defined(O_EXLOCK) && HASFLOCK
  4034.           omode |= O_EXLOCK;
  4035. ! # if !defined(OLD_NEWDB)
  4036.       }
  4037.       else
  4038.       {
  4039. --- 643,649 ----
  4040.           omode |= O_CREAT|O_TRUNC;
  4041.   #if defined(O_EXLOCK) && HASFLOCK
  4042.           omode |= O_EXLOCK;
  4043. ! # if !OLD_NEWDB
  4044.       }
  4045.       else
  4046.       {
  4047. ***************
  4048. *** 664,670 ****
  4049.               syserr("Cannot open BTREE database %s", map->map_file);
  4050.           return FALSE;
  4051.       }
  4052. ! #if !defined(OLD_NEWDB) && HASFLOCK
  4053.       fd = db->fd(db);
  4054.   # if !defined(O_EXLOCK)
  4055.       if (mode == O_RDWR && fd >= 0)
  4056. --- 667,673 ----
  4057.               syserr("Cannot open BTREE database %s", map->map_file);
  4058.           return FALSE;
  4059.       }
  4060. ! #if !OLD_NEWDB && HASFLOCK
  4061.       fd = db->fd(db);
  4062.   # if !defined(O_EXLOCK)
  4063.       if (mode == O_RDWR && fd >= 0)
  4064. ***************
  4065. *** 682,688 ****
  4066.   
  4067.       /* try to make sure that at least the database header is on disk */
  4068.       if (mode == O_RDWR)
  4069. ! #ifdef OLD_NEWDB
  4070.           (void) db->sync(db);
  4071.   #else
  4072.           (void) db->sync(db, 0);
  4073. --- 685,691 ----
  4074.   
  4075.       /* try to make sure that at least the database header is on disk */
  4076.       if (mode == O_RDWR)
  4077. ! #if OLD_NEWDB
  4078.           (void) db->sync(db);
  4079.   #else
  4080.           (void) db->sync(db, 0);
  4081. ***************
  4082. *** 724,730 ****
  4083.           omode |= O_CREAT|O_TRUNC;
  4084.   #if defined(O_EXLOCK) && HASFLOCK
  4085.           omode |= O_EXLOCK;
  4086. ! # if !defined(OLD_NEWDB)
  4087.       }
  4088.       else
  4089.       {
  4090. --- 727,733 ----
  4091.           omode |= O_CREAT|O_TRUNC;
  4092.   #if defined(O_EXLOCK) && HASFLOCK
  4093.           omode |= O_EXLOCK;
  4094. ! # if !OLD_NEWDB
  4095.       }
  4096.       else
  4097.       {
  4098. ***************
  4099. *** 748,754 ****
  4100.               syserr("Cannot open HASH database %s", map->map_file);
  4101.           return FALSE;
  4102.       }
  4103. ! #if !defined(OLD_NEWDB) && HASFLOCK
  4104.       fd = db->fd(db);
  4105.   # if !defined(O_EXLOCK)
  4106.       if (mode == O_RDWR && fd >= 0)
  4107. --- 751,757 ----
  4108.               syserr("Cannot open HASH database %s", map->map_file);
  4109.           return FALSE;
  4110.       }
  4111. ! #if !OLD_NEWDB && HASFLOCK
  4112.       fd = db->fd(db);
  4113.   # if !defined(O_EXLOCK)
  4114.       if (mode == O_RDWR && fd >= 0)
  4115. ***************
  4116. *** 766,772 ****
  4117.   
  4118.       /* try to make sure that at least the database header is on disk */
  4119.       if (mode == O_RDWR)
  4120. ! #ifdef OLD_NEWDB
  4121.           (void) db->sync(db);
  4122.   #else
  4123.           (void) db->sync(db, 0);
  4124. --- 769,775 ----
  4125.   
  4126.       /* try to make sure that at least the database header is on disk */
  4127.       if (mode == O_RDWR)
  4128. ! #if OLD_NEWDB
  4129.           (void) db->sync(db);
  4130.   #else
  4131.           (void) db->sync(db, 0);
  4132. ***************
  4133. *** 811,817 ****
  4134.       bcopy(name, keybuf, key.size + 1);
  4135.       if (!bitset(MF_NOFOLDCASE, map->map_mflags))
  4136.           makelower(keybuf);
  4137. ! #ifndef OLD_NEWDB
  4138.       fd = db->fd(db);
  4139.       if (fd >= 0 && !bitset(MF_LOCKED, map->map_mflags))
  4140.           (void) lockfile(db->fd(db), map->map_file, ".db", LOCK_SH);
  4141. --- 814,820 ----
  4142.       bcopy(name, keybuf, key.size + 1);
  4143.       if (!bitset(MF_NOFOLDCASE, map->map_mflags))
  4144.           makelower(keybuf);
  4145. ! #if !OLD_NEWDB
  4146.       fd = db->fd(db);
  4147.       if (fd >= 0 && !bitset(MF_LOCKED, map->map_mflags))
  4148.           (void) lockfile(db->fd(db), map->map_file, ".db", LOCK_SH);
  4149. ***************
  4150. *** 831,837 ****
  4151.               map->map_mflags &= ~MF_TRY0NULL;
  4152.       }
  4153.       saveerrno = errno;
  4154. ! #ifndef OLD_NEWDB
  4155.       if (fd >= 0 && !bitset(MF_LOCKED, map->map_mflags))
  4156.           (void) lockfile(fd, map->map_file, ".db", LOCK_UN);
  4157.   #endif
  4158. --- 834,840 ----
  4159.               map->map_mflags &= ~MF_TRY0NULL;
  4160.       }
  4161.       saveerrno = errno;
  4162. ! #if !OLD_NEWDB
  4163.       if (fd >= 0 && !bitset(MF_LOCKED, map->map_mflags))
  4164.           (void) lockfile(fd, map->map_file, ".db", LOCK_UN);
  4165.   #endif
  4166. ***************
  4167. *** 973,980 ****
  4168.           yperr = yp_get_default_domain(&map->map_domain);
  4169.           if (yperr != 0)
  4170.           {
  4171. !             syserr("NIS map %s specified, but NIS not running\n",
  4172. !                 map->map_file);
  4173.               return FALSE;
  4174.           }
  4175.       }
  4176. --- 976,984 ----
  4177.           yperr = yp_get_default_domain(&map->map_domain);
  4178.           if (yperr != 0)
  4179.           {
  4180. !             if (!bitset(MF_OPTIONAL, map->map_mflags))
  4181. !                 syserr("NIS map %s specified, but NIS not running\n",
  4182. !                     map->map_file);
  4183.               return FALSE;
  4184.           }
  4185.       }
  4186. *** src/mci.c.OLD    Wed Feb  9 07:40:15 1994
  4187. --- src/mci.c    Tue Apr 12 08:38:44 1994
  4188. ***************
  4189. *** 33,39 ****
  4190.    */
  4191.   
  4192.   #ifndef lint
  4193. ! static char sccsid[] = "@(#)mci.c    8.12 (Berkeley) 2/9/94";
  4194.   #endif /* not lint */
  4195.   
  4196.   #include "sendmail.h"
  4197. --- 33,39 ----
  4198.    */
  4199.   
  4200.   #ifndef lint
  4201. ! static char sccsid[] = "@(#)mci.c    8.13 (Berkeley) 4/12/94";
  4202.   #endif /* not lint */
  4203.   
  4204.   #include "sendmail.h"
  4205. ***************
  4206. *** 367,375 ****
  4207. --- 367,377 ----
  4208.           mci->mci_host == NULL ? "NULL" : mci->mci_host,
  4209.           ctime(&mci->mci_lastuse));
  4210.   printit:
  4211. + #ifdef LOG
  4212.       if (logit)
  4213.           syslog(LOG_DEBUG, "%s", buf);
  4214.       else
  4215. + #endif
  4216.           printf("%s\n", buf);
  4217.   }
  4218.    /*
  4219. *** src/parseaddr.c.OLD    Wed Feb  9 11:32:30 1994
  4220. --- src/parseaddr.c    Fri Apr 15 09:27:16 1994
  4221. ***************
  4222. *** 33,39 ****
  4223.    */
  4224.   
  4225.   #ifndef lint
  4226. ! static char sccsid[] = "@(#)parseaddr.c    8.30 (Berkeley) 2/9/94";
  4227.   #endif /* not lint */
  4228.   
  4229.   # include "sendmail.h"
  4230. --- 33,39 ----
  4231.    */
  4232.   
  4233.   #ifndef lint
  4234. ! static char sccsid[] = "@(#)parseaddr.c    8.31 (Berkeley) 4/15/94";
  4235.   #endif /* not lint */
  4236.   
  4237.   # include "sendmail.h"
  4238. ***************
  4239. *** 132,138 ****
  4240.   
  4241.           if (savec != '\0')
  4242.               **delimptr = '\0';
  4243. !         addr = newstr(addr);
  4244.           if (savec != '\0')
  4245.               **delimptr = savec;
  4246.       }
  4247. --- 132,138 ----
  4248.   
  4249.           if (savec != '\0')
  4250.               **delimptr = '\0';
  4251. !         e->e_to = addr = newstr(addr);
  4252.           if (savec != '\0')
  4253.               **delimptr = savec;
  4254.       }
  4255. *** src/queue.c.OLD    Sun Mar  6 09:00:40 1994
  4256. --- src/queue.c    Mon Apr 18 15:17:17 1994
  4257. ***************
  4258. *** 36,44 ****
  4259.   
  4260.   #ifndef lint
  4261.   #ifdef QUEUE
  4262. ! static char sccsid[] = "@(#)queue.c    8.40 (Berkeley) 3/6/94 (with queueing)";
  4263.   #else
  4264. ! static char sccsid[] = "@(#)queue.c    8.40 (Berkeley) 3/6/94 (without queueing)";
  4265.   #endif
  4266.   #endif /* not lint */
  4267.   
  4268. --- 36,44 ----
  4269.   
  4270.   #ifndef lint
  4271.   #ifdef QUEUE
  4272. ! static char sccsid[] = "@(#)queue.c    8.41 (Berkeley) 4/18/94 (with queueing)";
  4273.   #else
  4274. ! static char sccsid[] = "@(#)queue.c    8.41 (Berkeley) 4/18/94 (without queueing)";
  4275.   #endif
  4276.   #endif /* not lint */
  4277.   
  4278. ***************
  4279. *** 179,185 ****
  4280.   
  4281.           e->e_df = queuename(e, 'd');
  4282.           e->e_df = newstr(e->e_df);
  4283. !         fd = open(e->e_df, O_WRONLY|O_CREAT, FileMode);
  4284.           if (fd < 0 || (dfp = fdopen(fd, "w")) == NULL)
  4285.               syserr("!queueup: cannot create data temp file %s, uid=%d",
  4286.                   e->e_df, geteuid());
  4287. --- 179,185 ----
  4288.   
  4289.           e->e_df = queuename(e, 'd');
  4290.           e->e_df = newstr(e->e_df);
  4291. !         fd = open(e->e_df, O_WRONLY|O_CREAT|O_TRUNC, FileMode);
  4292.           if (fd < 0 || (dfp = fdopen(fd, "w")) == NULL)
  4293.               syserr("!queueup: cannot create data temp file %s, uid=%d",
  4294.                   e->e_df, geteuid());
  4295. *** src/sendmail.h.OLD    Sun Feb  6 14:07:22 1994
  4296. --- src/sendmail.h    Thu Apr 14 08:31:24 1994
  4297. ***************
  4298. *** 31,37 ****
  4299.    * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  4300.    * SUCH DAMAGE.
  4301.    *
  4302. !  *    @(#)sendmail.h    8.41 (Berkeley) 2/6/94
  4303.    */
  4304.   
  4305.   /*
  4306. --- 31,37 ----
  4307.    * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  4308.    * SUCH DAMAGE.
  4309.    *
  4310. !  *    @(#)sendmail.h    8.43 (Berkeley) 4/14/94
  4311.    */
  4312.   
  4313.   /*
  4314. ***************
  4315. *** 41,47 ****
  4316.   # ifdef _DEFINE
  4317.   # define EXTERN
  4318.   # ifndef lint
  4319. ! static char SmailSccsId[] =    "@(#)sendmail.h    8.41        2/6/94";
  4320.   # endif
  4321.   # else /*  _DEFINE */
  4322.   # define EXTERN extern
  4323. --- 41,47 ----
  4324.   # ifdef _DEFINE
  4325.   # define EXTERN
  4326.   # ifndef lint
  4327. ! static char SmailSccsId[] =    "@(#)sendmail.h    8.43        4/14/94";
  4328.   # endif
  4329.   # else /*  _DEFINE */
  4330.   # define EXTERN extern
  4331. ***************
  4332. *** 377,382 ****
  4333. --- 377,383 ----
  4334.   #define EF_PM_NOTIFY    0x0002000    /* send return mail to postmaster */
  4335.   #define EF_METOO    0x0004000    /* send to me too */
  4336.   #define EF_LOGSENDER    0x0008000    /* need to log the sender */
  4337. + #define EF_NORECEIPT    0x0010000    /* suppress all return-receipts */
  4338.   
  4339.   EXTERN ENVELOPE    *CurEnv;    /* envelope currently being processed */
  4340.    /*
  4341. ***************
  4342. *** 704,709 ****
  4343. --- 705,711 ----
  4344.   #define PRIV_NOEXPN        00010    /* disallow EXPN command entirely */
  4345.   #define PRIV_NOVRFY        00020    /* disallow VRFY command entirely */
  4346.   #define PRIV_AUTHWARNINGS    00040    /* flag possible authorization probs */
  4347. + #define PRIV_NORECEIPTS        00100    /* disallow return receipts */
  4348.   #define PRIV_RESTRICTMAILQ    01000    /* restrict mailq command */
  4349.   #define PRIV_RESTRICTQRUN    02000    /* restrict queue run */
  4350.   #define PRIV_GOAWAY        00777    /* don't give no info, anyway, anyhow */
  4351. *** src/srvrsmtp.c.OLD    Fri Apr  8 08:35:38 1994
  4352. --- src/srvrsmtp.c    Wed Apr 13 08:57:39 1994
  4353. ***************
  4354. *** 36,44 ****
  4355.   
  4356.   #ifndef lint
  4357.   #ifdef SMTP
  4358. ! static char sccsid[] = "@(#)srvrsmtp.c    8.32 (Berkeley) 3/8/94 (with SMTP)";
  4359.   #else
  4360. ! static char sccsid[] = "@(#)srvrsmtp.c    8.32 (Berkeley) 3/8/94 (without SMTP)";
  4361.   #endif
  4362.   #endif /* not lint */
  4363.   
  4364. --- 36,44 ----
  4365.   
  4366.   #ifndef lint
  4367.   #ifdef SMTP
  4368. ! static char sccsid[] = "@(#)srvrsmtp.c    8.37 (Berkeley) 4/13/94 (with SMTP)";
  4369.   #else
  4370. ! static char sccsid[] = "@(#)srvrsmtp.c    8.37 (Berkeley) 4/13/94 (without SMTP)";
  4371.   #endif
  4372.   #endif /* not lint */
  4373.   
  4374. ***************
  4375. *** 135,141 ****
  4376.       bool vrfy;            /* set if this is a vrfy command */
  4377.       char *protocol;            /* sending protocol */
  4378.       char *sendinghost;        /* sending hostname */
  4379. !     long msize;            /* approximate maximum message size */
  4380.       char *peerhostname;        /* name of SMTP peer or "localhost" */
  4381.       auto char *delimptr;
  4382.       char *id;
  4383. --- 135,141 ----
  4384.       bool vrfy;            /* set if this is a vrfy command */
  4385.       char *protocol;            /* sending protocol */
  4386.       char *sendinghost;        /* sending hostname */
  4387. !     unsigned long msize;        /* approximate maximum message size */
  4388.       char *peerhostname;        /* name of SMTP peer or "localhost" */
  4389.       auto char *delimptr;
  4390.       char *id;
  4391. ***************
  4392. *** 165,175 ****
  4393.       expand("\201e", inp, &inp[sizeof inp], e);
  4394.       if (BrokenSmtpPeers)
  4395.       {
  4396.           message("220 %s", inp);
  4397.       }
  4398.       else
  4399.       {
  4400. !         message("220-%s", inp);
  4401.           message("220 ESMTP spoken here");
  4402.       }
  4403.       protocol = NULL;
  4404. --- 165,187 ----
  4405.       expand("\201e", inp, &inp[sizeof inp], e);
  4406.       if (BrokenSmtpPeers)
  4407.       {
  4408. +         p = strchr(inp, '\n');
  4409. +         if (p != NULL)
  4410. +             *p = '\0';
  4411.           message("220 %s", inp);
  4412.       }
  4413.       else
  4414.       {
  4415. !         char *q = inp;
  4416. !         while (q != NULL)
  4417. !         {
  4418. !             p = strchr(q, '\n');
  4419. !             if (p != NULL)
  4420. !                 *p++ = '\0';
  4421. !             message("220-%s", q);
  4422. !             q = p;
  4423. !         }
  4424.           message("220 ESMTP spoken here");
  4425.       }
  4426.       protocol = NULL;
  4427. ***************
  4428. *** 285,291 ****
  4429.               
  4430.               /* print extended message and brag */
  4431.               message("250-%s Hello %s, pleased to meet you",
  4432. !                 MyHostName, p);
  4433.               if (!bitset(PRIV_NOEXPN, PrivacyFlags))
  4434.                   message("250-EXPN");
  4435.               if (MaxMessageSize > 0)
  4436. --- 297,303 ----
  4437.               
  4438.               /* print extended message and brag */
  4439.               message("250-%s Hello %s, pleased to meet you",
  4440. !                 MyHostName, CurSmtpClient);
  4441.               if (!bitset(PRIV_NOEXPN, PrivacyFlags))
  4442.                   message("250-EXPN");
  4443.               if (MaxMessageSize > 0)
  4444. ***************
  4445. *** 389,395 ****
  4446.   
  4447.               /* now parse ESMTP arguments */
  4448.               msize = 0;
  4449. !             for (; p != NULL && *p != '\0'; p++)
  4450.               {
  4451.                   char *kp;
  4452.                   char *vp = NULL;
  4453. --- 401,407 ----
  4454.   
  4455.               /* now parse ESMTP arguments */
  4456.               msize = 0;
  4457. !             while (p != NULL && *p != '\0')
  4458.               {
  4459.                   char *kp;
  4460.                   char *vp = NULL;
  4461. ***************
  4462. *** 420,426 ****
  4463.                       *p++ = '\0';
  4464.   
  4465.                   if (tTd(19, 1))
  4466. !                     printf("MAIL: got arg %s=%s\n", kp,
  4467.                           vp == NULL ? "<null>" : vp);
  4468.   
  4469.                   if (strcasecmp(kp, "size") == 0)
  4470. --- 432,438 ----
  4471.                       *p++ = '\0';
  4472.   
  4473.                   if (tTd(19, 1))
  4474. !                     printf("MAIL: got arg %s=\"%s\"\n", kp,
  4475.                           vp == NULL ? "<null>" : vp);
  4476.   
  4477.                   if (strcasecmp(kp, "size") == 0)
  4478. ***************
  4479. *** 430,436 ****
  4480.                           usrerr("501 SIZE requires a value");
  4481.                           /* NOTREACHED */
  4482.                       }
  4483. !                     msize = atol(vp);
  4484.                   }
  4485.                   else if (strcasecmp(kp, "body") == 0)
  4486.                   {
  4487. --- 442,452 ----
  4488.                           usrerr("501 SIZE requires a value");
  4489.                           /* NOTREACHED */
  4490.                       }
  4491. ! # ifdef __STDC__
  4492. !                     msize = strtoul(vp, (char **) NULL, 10);
  4493. ! # else
  4494. !                     msize = strtol(vp, (char **) NULL, 10);
  4495. ! # endif
  4496.                   }
  4497.                   else if (strcasecmp(kp, "body") == 0)
  4498.                   {
  4499. *** src/udb.c.OLD    Fri Mar 11 14:42:17 1994
  4500. --- src/udb.c    Thu Apr 14 09:42:55 1994
  4501. ***************
  4502. *** 36,44 ****
  4503.   
  4504.   #ifndef lint
  4505.   #ifdef USERDB
  4506. ! static char sccsid [] = "@(#)udb.c    8.6 (Berkeley) 3/11/94 (with USERDB)";
  4507.   #else
  4508. ! static char sccsid [] = "@(#)udb.c    8.6 (Berkeley) 3/11/94 (without USERDB)";
  4509.   #endif
  4510.   #endif
  4511.   
  4512. --- 36,44 ----
  4513.   
  4514.   #ifndef lint
  4515.   #ifdef USERDB
  4516. ! static char sccsid [] = "@(#)udb.c    8.8 (Berkeley) 4/14/94 (with USERDB)";
  4517.   #else
  4518. ! static char sccsid [] = "@(#)udb.c    8.8 (Berkeley) 4/14/94 (without USERDB)";
  4519.   #endif
  4520.   #endif
  4521.   
  4522. ***************
  4523. *** 48,53 ****
  4524. --- 48,57 ----
  4525.   #include <netdb.h>
  4526.   #include <db.h>
  4527.   
  4528. + #ifdef HESIOD
  4529. + #include <hesiod.h>
  4530. + #endif /* HESIOD */
  4531.   /*
  4532.   **  UDB.C -- interface between sendmail and Berkeley User Data Base.
  4533.   **
  4534. ***************
  4535. *** 94,99 ****
  4536. --- 98,104 ----
  4537.   #define UDB_REMOTE    2    /* look up in remote database */
  4538.   #define UDB_DBFETCH    3    /* look up in local database */
  4539.   #define UDB_FORWARD    4    /* forward to remote host */
  4540. + #define UDB_HESIOD    5    /* look up via hesiod */
  4541.   
  4542.   #define MAXUDBENT    10    /* maximum number of UDB entries */
  4543.   
  4544. ***************
  4545. *** 164,169 ****
  4546. --- 169,178 ----
  4547.       if (UdbSpec == NULL || UdbSpec[0] == '\0')
  4548.           return EX_OK;
  4549.   
  4550. +     /* short circuit name begins with '\\' since it can't possibly match */
  4551. +     if (a->q_user[0] == '\\')
  4552. +         return EX_OK;
  4553.       /* if name is too long, assume it won't match */
  4554.       if (strlen(a->q_user) > sizeof keybuf - 12)
  4555.           return EX_OK;
  4556. ***************
  4557. *** 196,202 ****
  4558.               key.data = keybuf;
  4559.               key.size = keylen;
  4560.               if (tTd(28, 80))
  4561. !                 printf("udbexpand: trying %s (%d)\n",
  4562.                       keybuf, keylen);
  4563.               i = (*up->udb_dbp->seq)(up->udb_dbp, &key, &info, R_CURSOR);
  4564.               if (i > 0 || info.size <= 0)
  4565. --- 205,211 ----
  4566.               key.data = keybuf;
  4567.               key.size = keylen;
  4568.               if (tTd(28, 80))
  4569. !                 printf("udbexpand: trying %s (%d) via db\n",
  4570.                       keybuf, keylen);
  4571.               i = (*up->udb_dbp->seq)(up->udb_dbp, &key, &info, R_CURSOR);
  4572.               if (i > 0 || info.size <= 0)
  4573. ***************
  4574. *** 283,290 ****
  4575. --- 292,395 ----
  4576.               a->q_owner = xalloc(info.size + 1);
  4577.               bcopy(info.data, a->q_owner, info.size);
  4578.               a->q_owner[info.size] = '\0';
  4579. +             /* announce delivery; NORECEIPT bit set later */
  4580. +             if (e->e_xfp != NULL)
  4581. +             {
  4582. +                 fprintf(e->e_xfp,
  4583. +                     "Message delivered to mailing list %s\n",
  4584. +                     a->q_paddr);
  4585. +                 e->e_flags |= EF_SENDRECEIPT;
  4586. +             }
  4587.               break;
  4588.   
  4589. + #ifdef HESIOD
  4590. +           case UDB_HESIOD:
  4591. +             key.data = keybuf;
  4592. +             key.size = keylen;
  4593. +             if (tTd(28, 80))
  4594. +                 printf("udbexpand: trying %s (%d) via hesiod\n",
  4595. +                     keybuf, keylen);
  4596. +             /* look up the key via hesiod */
  4597. +             i = hes_udb_get(&key, &info);
  4598. +             if (i > 0 || info.size <= 0)
  4599. +             {
  4600. +                 if (tTd(28, 2))
  4601. +                 printf("udbexpand: no match on %s (%d)\n",
  4602. +                     keybuf, keylen);
  4603. +                 continue;
  4604. +             }
  4605. +             if (tTd(28, 80))
  4606. +                 printf("udbexpand: match %.*s: %.*s\n",
  4607. +                     key.size, key.data, info.size, info.data);
  4608. +             a->q_flags &= ~QSELFREF;
  4609. +             if (bitset(EF_VRFYONLY, e->e_flags))
  4610. +             {
  4611. +                 a->q_flags |= QVERIFIED;
  4612. +                 e->e_nrcpts++;
  4613. +                 free(info.data);
  4614. +                 return EX_OK;
  4615. +             }
  4616. +             breakout = TRUE;
  4617. +             if (info.size < sizeof buf)
  4618. +                 user = buf;
  4619. +             else
  4620. +                 user = xalloc(info.size + 1);
  4621. +             bcopy(info.data, user, info.size);
  4622. +             user[info.size] = '\0';
  4623. +             free(info.data);
  4624. +             message("hesioded to %s", user);
  4625. + #ifdef LOG
  4626. +             if (LogLevel >= 10)
  4627. +                 syslog(LOG_INFO, "%s: hesiod %s => %s",
  4628. +                     e->e_id, e->e_to, user);
  4629. + #endif
  4630. +             AliasLevel++;
  4631. +             naddrs = sendtolist(user, a, sendq, e);
  4632. +             AliasLevel--;
  4633. +             if (user != buf)
  4634. +                 free(user);
  4635. +             if (naddrs > 0 && !bitset(QSELFREF, a->q_flags))
  4636. +             {
  4637. +                 if (tTd(28, 5))
  4638. +                 {
  4639. +                     printf("udbexpand: QDONTSEND ");
  4640. +                     printaddr(a, FALSE);
  4641. +                 }
  4642. +                 a->q_flags |= QDONTSEND;
  4643. +             }
  4644. +             if (i < 0)
  4645. +             {
  4646. +                 syserr("udbexpand: hesiod-get %.*s stat %d",
  4647. +                     key.size, key.data, i);
  4648. +                 return EX_TEMPFAIL;
  4649. +             }
  4650. +             /*
  4651. +             **  If this address has a -request address, reflect
  4652. +             **  it into the envelope.
  4653. +             */
  4654. +             (void) strcpy(keybuf, a->q_user);
  4655. +             (void) strcat(keybuf, ":mailsender");
  4656. +             keylen = strlen(keybuf);
  4657. +             key.data = keybuf;
  4658. +             key.size = keylen;
  4659. +             i = hes_udb_get(&key, &info);
  4660. +             if (i != 0 || info.size <= 0)
  4661. +                 break;
  4662. +             a->q_owner = xalloc(info.size + 1);
  4663. +             bcopy(info.data, a->q_owner, info.size);
  4664. +             a->q_owner[info.size] = '\0';
  4665. +             free(info.data);
  4666. +             break;
  4667. + #endif /* HESIOD */
  4668.             case UDB_REMOTE:
  4669.               /* not yet implemented */
  4670.               continue;
  4671. ***************
  4672. *** 378,383 ****
  4673. --- 483,492 ----
  4674.       if (UdbSpec == NULL || UdbSpec[0] == '\0')
  4675.           return NULL;
  4676.   
  4677. +     /* short circuit name begins with '\\' since it can't possibly match */
  4678. +     if (user[0] == '\\')
  4679. +         return NULL;
  4680.       /* long names can never match and are a pain to deal with */
  4681.       if ((strlen(user) + strlen(field)) > sizeof keybuf - 4)
  4682.           return NULL;
  4683. ***************
  4684. *** 407,413 ****
  4685.               if (i != 0 || info.size <= 0)
  4686.               {
  4687.                   if (tTd(28, 2))
  4688. !                     printf("udbmatch: no match on %s (%d)\n",
  4689.                               keybuf, keylen);
  4690.                   continue;
  4691.               }
  4692. --- 516,522 ----
  4693.               if (i != 0 || info.size <= 0)
  4694.               {
  4695.                   if (tTd(28, 2))
  4696. !                     printf("udbmatch: no match on %s (%d) via db\n",
  4697.                               keybuf, keylen);
  4698.                   continue;
  4699.               }
  4700. ***************
  4701. *** 418,423 ****
  4702. --- 527,556 ----
  4703.               if (tTd(28, 1))
  4704.                   printf("udbmatch ==> %s\n", p);
  4705.               return p;
  4706. +             break;
  4707. + #ifdef HESIOD
  4708. +           case UDB_HESIOD:
  4709. +             key.data = keybuf;
  4710. +             key.size = keylen;
  4711. +             i = hes_udb_get(&key, &info); 
  4712. +             if (i != 0 || info.size <= 0)
  4713. +             {
  4714. +                 if (tTd(28, 2))
  4715. +                     printf("udbmatch: no match on %s (%d) via hesiod\n",
  4716. +                             keybuf, keylen);
  4717. +                 continue;
  4718. +             }
  4719. +             p = xalloc(info.size + 1);
  4720. +             bcopy(info.data, p, info.size);
  4721. +             p[info.size] = '\0';
  4722. +             free(info.data);
  4723. +             if (tTd(28, 1))
  4724. +                 printf("udbmatch ==> %s\n", p);
  4725. +             return p;
  4726. +             break;
  4727. + #endif /* HESIOD */
  4728.           }
  4729.       }
  4730.   
  4731. ***************
  4732. *** 479,484 ****
  4733. --- 612,665 ----
  4734.               if (tTd(28, 1))
  4735.                   printf("udbmatch ==> %s\n", p);
  4736.               return p;
  4737. +             break;
  4738. + #ifdef HESIOD
  4739. +           case UDB_HESIOD:
  4740. +             /* get the default case for this database */
  4741. +             if (up->udb_default == NULL)
  4742. +             {
  4743. +                 key.data = ":default:mailname";
  4744. +                 key.size = strlen(key.data);
  4745. +                 i = hes_udb_get(&key, &info); 
  4746. +                 if (i != 0 || info.size <= 0)
  4747. +                 {
  4748. +                     /* no default case */
  4749. +                     up->udb_default = "";
  4750. +                     continue;
  4751. +                 }
  4752. +                 /* save the default case */
  4753. +                 up->udb_default = xalloc(info.size + 1);
  4754. +                 bcopy(info.data, up->udb_default, info.size);
  4755. +                 up->udb_default[info.size] = '\0';
  4756. +                 free(info.data);
  4757. +             }
  4758. +             else if (up->udb_default[0] == '\0')
  4759. +                 continue;
  4760. +             /* we have a default case -- verify user:maildrop */
  4761. +             key.data = keybuf;
  4762. +             key.size = keylen;
  4763. +             i = hes_udb_get(&key, &info);
  4764. +             if (i != 0 || info.size <= 0)
  4765. +             {
  4766. +                 /* nope -- no aliasing for this user */
  4767. +                 continue;
  4768. +             }
  4769. +             free(info.data);
  4770. +             /* they exist -- build the actual address */
  4771. +             p = xalloc(strlen(user) + strlen(up->udb_default) + 2);
  4772. +             (void) strcpy(p, user);
  4773. +             (void) strcat(p, "@");
  4774. +             (void) strcat(p, up->udb_default);
  4775. +             if (tTd(28, 1))
  4776. +                 printf("udbmatch ==> %s\n", p);
  4777. +             return p;
  4778. +             break;
  4779. + #endif /* HESIOD */
  4780.           }
  4781.       }
  4782.   
  4783. ***************
  4784. *** 622,627 ****
  4785. --- 803,818 ----
  4786.               up++;
  4787.               break;
  4788.   
  4789. +           case 'h':    /* use hesiod */
  4790. +           case 'H':
  4791. + #ifdef HESIOD
  4792. +             if (strcasecmp(spec, "hesiod") != 0)
  4793. +                 break;
  4794. +             up->udb_type = UDB_HESIOD;
  4795. +             up++;
  4796. + #endif /* HESIOD */
  4797. +             break;
  4798.             case '/':    /* look up remote name */
  4799.               up->udb_dbname = spec;
  4800.               errno = 0;
  4801. ***************
  4802. *** 669,674 ****
  4803. --- 860,869 ----
  4804.                       up->udb_fwdhost);
  4805.                   break;
  4806.   
  4807. +               case UDB_HESIOD:
  4808. +                 printf("HESIOD\n");
  4809. +                 break;
  4810.                 default:
  4811.                   printf("UNKNOWN\n");
  4812.                   break;
  4813. ***************
  4814. *** 724,729 ****
  4815. --- 919,975 ----
  4816.       }
  4817.       return optnum;
  4818.   }
  4819. + #ifdef HESIOD
  4820. + int
  4821. + hes_udb_get(key, info)
  4822. +     DBT *key;
  4823. +     DBT *info;
  4824. + {
  4825. +     char *name, *type;
  4826. +     char *p, **hp;
  4827. +     name = key->data;
  4828. +     type = strchr(name, ':');
  4829. +     if (type == NULL)
  4830. +         return 1;
  4831. +     *type++ = '\0';
  4832. +     if (tTd(28, 1))
  4833. +         printf("hes_udb_get(%s, %s)\n", name, type);
  4834. +     /* make the hesiod query */
  4835. +     hp = hes_resolve(name, type);
  4836. +     if (hp == NULL)
  4837. +     {
  4838. +         /* network problem or timeout */
  4839. +         if (hes_error() == HES_ER_NET)
  4840. +             return -1;
  4841. +         return 1;
  4842. +     }
  4843. +     else
  4844. +     {
  4845. +         /*
  4846. +         **  If there are multiple matches, just return the
  4847. +         **  first one and free the others.
  4848. +         **
  4849. +         **  XXX These should really be returned; for example,
  4850. +         **  XXX it is legal for :maildrop to be multi-valued.
  4851. +         */
  4852. +         for (p = hp[1]; p; p++)
  4853. +             free(p);
  4854. +         info->data = hp[0];
  4855. +         info->size = (size_t) strlen(info->data);
  4856. +     }
  4857. +     return 0;
  4858. + }
  4859. + #endif /* HESIOD */
  4860.   
  4861.   #else /* not USERDB */
  4862.   
  4863. *** src/util.c.OLD    Fri Apr  8 08:35:48 1994
  4864. --- src/util.c    Thu Apr 14 09:58:02 1994
  4865. ***************
  4866. *** 33,39 ****
  4867.    */
  4868.   
  4869.   #ifndef lint
  4870. ! static char sccsid[] = "@(#)util.c    8.34 (Berkeley) 3/11/94";
  4871.   #endif /* not lint */
  4872.   
  4873.   # include "sendmail.h"
  4874. --- 33,39 ----
  4875.    */
  4876.   
  4877.   #ifndef lint
  4878. ! static char sccsid[] = "@(#)util.c    8.39 (Berkeley) 4/14/94";
  4879.   #endif /* not lint */
  4880.   
  4881.   # include "sendmail.h"
  4882. ***************
  4883. *** 100,105 ****
  4884. --- 100,109 ----
  4885.   {
  4886.       register char *p;
  4887.   
  4888. +     /* some systems can't handle size zero mallocs */
  4889. +     if (sz <= 0)
  4890. +         sz = 1;
  4891.       p = malloc((unsigned) sz);
  4892.       if (p == NULL)
  4893.       {
  4894. ***************
  4895. *** 836,841 ****
  4896. --- 840,848 ----
  4897.   
  4898.   static jmp_buf    CtxReadTimeout;
  4899.   static int    readtimeout();
  4900. + static EVENT    *GlobalTimeout = NULL;
  4901. + static bool    EnableTimeout = FALSE;
  4902. + static int    ReadProgress;
  4903.   
  4904.   char *
  4905.   sfgets(buf, siz, fp, timeout, during)
  4906. ***************
  4907. *** 873,879 ****
  4908.   #endif
  4909.               return (NULL);
  4910.           }
  4911. !         ev = setevent(timeout, readtimeout, 0);
  4912.       }
  4913.   
  4914.       /* try to read */
  4915. --- 880,889 ----
  4916.   #endif
  4917.               return (NULL);
  4918.           }
  4919. !         if (GlobalTimeout == NULL)
  4920. !             ev = setevent(timeout, readtimeout, 0);
  4921. !         else
  4922. !             EnableTimeout = TRUE;
  4923.       }
  4924.   
  4925.       /* try to read */
  4926. ***************
  4927. *** 888,894 ****
  4928.       }
  4929.   
  4930.       /* clear the event if it has not sprung */
  4931. !     clrevent(ev);
  4932.   
  4933.       /* clean up the books and exit */
  4934.       LineNumber++;
  4935. --- 898,907 ----
  4936.       }
  4937.   
  4938.       /* clear the event if it has not sprung */
  4939. !     if (GlobalTimeout == NULL)
  4940. !         clrevent(ev);
  4941. !     else
  4942. !         EnableTimeout = FALSE;
  4943.   
  4944.       /* clean up the books and exit */
  4945.       LineNumber++;
  4946. ***************
  4947. *** 907,916 ****
  4948.       return (buf);
  4949.   }
  4950.   
  4951.   static
  4952. ! readtimeout()
  4953.   {
  4954. !     longjmp(CtxReadTimeout, 1);
  4955.   }
  4956.    /*
  4957.   **  FGETFOLDED -- like fgets, but know about folded lines.
  4958. --- 920,963 ----
  4959.       return (buf);
  4960.   }
  4961.   
  4962. + void
  4963. + sfgetset(timeout)
  4964. +     time_t timeout;
  4965. + {
  4966. +     /* cancel pending timer */
  4967. +     if (GlobalTimeout != NULL)
  4968. +     {
  4969. +         clrevent(GlobalTimeout);
  4970. +         GlobalTimeout = NULL;
  4971. +     }
  4972. +     /* schedule fresh one if so requested */
  4973. +     if (timeout != 0)
  4974. +     {
  4975. +         ReadProgress = LineNumber;
  4976. +         GlobalTimeout = setevent(timeout, readtimeout, timeout);
  4977. +     }
  4978. + }
  4979.   static
  4980. ! readtimeout(timeout)
  4981. !     time_t timeout;
  4982.   {
  4983. !     /* terminate if ordinary timeout */
  4984. !     if (GlobalTimeout == NULL)
  4985. !         longjmp(CtxReadTimeout, 1);
  4986. !     /* terminate if no progress was made -- reset state */
  4987. !     if (EnableTimeout && (LineNumber <= ReadProgress))
  4988. !     {
  4989. !         EnableTimeout = FALSE;
  4990. !         GlobalTimeout = NULL;
  4991. !         longjmp(CtxReadTimeout, 2);
  4992. !     }
  4993. !     /* schedule a new timeout */
  4994. !     GlobalTimeout = NULL;
  4995. !     sfgetset(timeout);
  4996.   }
  4997.    /*
  4998.   **  FGETFOLDED -- like fgets, but know about folded lines.
  4999. ***************
  5000. *** 1259,1264 ****
  5001. --- 1306,1312 ----
  5002.   {
  5003.       register struct hostent *hp;
  5004.       register char *p;
  5005. +     char *fmtstr;
  5006.       struct sockaddr_in sin;
  5007.       auto int slen;
  5008.       struct stat st;
  5009. ***************
  5010. *** 1350,1356 ****
  5011.   
  5012.         default:
  5013.   defprint:
  5014. !         sprintf(p, "dev=%d/%d, ino=%d, nlink=%d, u/gid=%d/%d, size=%ld",
  5015.               major(st.st_dev), minor(st.st_dev), st.st_ino,
  5016.               st.st_nlink, st.st_uid, st.st_gid, st.st_size);
  5017.           break;
  5018. --- 1398,1408 ----
  5019.   
  5020.         default:
  5021.   defprint:
  5022. !         if (sizeof st.st_size > sizeof (long))
  5023. !             fmtstr = "dev=%d/%d, ino=%d, nlink=%d, u/gid=%d/%d, size=%qd";
  5024. !         else
  5025. !             fmtstr = "dev=%d/%d, ino=%d, nlink=%d, u/gid=%d/%d, size=%ld";
  5026. !         sprintf(p, fmtstr,
  5027.               major(st.st_dev), minor(st.st_dev), st.st_ino,
  5028.               st.st_nlink, st.st_uid, st.st_gid, st.st_size);
  5029.           break;
  5030. ***************
  5031. *** 1357,1365 ****
  5032. --- 1409,1419 ----
  5033.       }
  5034.   
  5035.   printit:
  5036. + #ifdef LOG
  5037.       if (logit)
  5038.           syslog(LOG_DEBUG, "%s", buf);
  5039.       else
  5040. + #endif
  5041.           printf("%s\n", buf);
  5042.   }
  5043.    /*
  5044. *** src/version.c.OLD    Fri Apr  8 08:36:32 1994
  5045. --- src/version.c    Mon Apr 18 22:18:12 1994
  5046. ***************
  5047. *** 33,39 ****
  5048.    */
  5049.   
  5050.   #ifndef lint
  5051. ! static char sccsid[] = "@(#)version.c    8.6.8.1 (Berkeley) 3/18/94";
  5052.   #endif /* not lint */
  5053.   
  5054. ! char    Version[] = "8.6.8.1";
  5055. --- 33,39 ----
  5056.    */
  5057.   
  5058.   #ifndef lint
  5059. ! static char sccsid[] = "@(#)version.c    8.6.9.1 (Berkeley) 4/18/94";
  5060.   #endif /* not lint */
  5061.   
  5062. ! char    Version[] = "8.6.9";
  5063.